Skip to content

Commit

Permalink
Updated pom.xml
Browse files Browse the repository at this point in the history
Commented out a few files
  • Loading branch information
tswagger committed Mar 22, 2022
1 parent b68c54d commit bf6a16c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion contrib/format-fixedwidth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>drill-contrib-parent</artifactId>
<groupId>org.apache.drill.contrib</groupId>
<version>1.21.0-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>
<artifactId>drill-format-fixedwidth</artifactId>
<name>Drill : Contrib : Format : FixedWidth</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
import org.apache.hadoop.mapred.FileSplit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.epam.parso.impl;

import java.io.BufferedReader;
import java.io.IOException;
//import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

Expand Down Expand Up @@ -51,9 +50,9 @@ public void close() {
}

private ResultSetLoader open(FileSchemaNegotiator negotiator) {
this.split = (FileSplit) negotiator.split();
// this.split = (FileSplit) negotiator.split();
this.errorContext = negotiator.parentErrorContext();
openFile(negotiator);
// openFile(negotiator);

try {
negotiator.tableSchema(buildSchema(), true);
Expand All @@ -70,20 +69,20 @@ private ResultSetLoader open(FileSchemaNegotiator negotiator) {
return this.loader;
}

private void openFile(FileSchemaNegotiator negotiator) {
try {
this.fsStream = negotiator.file().fileSystem().openPossiblyCompressedStream(this.split.getPath());
sasFileReader = new SasFileReaderImpl(this.fsStream);
firstRow = sasFileReader.readNext();
} catch (IOException e) {
throw UserException
.dataReadError(e)
.message("Unable to open Fixed Width File %s", this.split.getPath())
.addContext(e.getMessage())
.addContext(this.errorContext)
.build(FixedWidthBatchReader.logger);
}
}
// private void openFile(FileSchemaNegotiator negotiator) {
// try {
// this.fsStream = negotiator.file().fileSystem().openPossiblyCompressedStream(this.split.getPath());
// sasFileReader = new SasFileReaderImpl(this.fsStream);
// firstRow = sasFileReader.readNext();
// } catch (IOException e) {
// throw UserException
// .dataReadError(e)
// .message("Unable to open Fixed Width File %s", this.split.getPath())
// .addContext(e.getMessage())
// .addContext(this.errorContext)
// .build(FixedWidthBatchReader.logger);
// }
// }

private TupleMetadata buildSchema() {
SchemaBuilder builder = new SchemaBuilder();
Expand Down

0 comments on commit bf6a16c

Please sign in to comment.