Skip to content

Commit

Permalink
Resolves method dispatch ambiguity which was causing XLS parse failur…
Browse files Browse the repository at this point in the history
…e. Removed spurious warning message about extra NAs being added.
  • Loading branch information
bghill committed Aug 16, 2014
1 parent 346f68e commit 84687d0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/main/java/water/fvec/ParseDataset2.java
Original file line number Diff line number Diff line change
Expand Up @@ -618,9 +618,12 @@ private FVecDataOut streamParse( final InputStream is, final CustomParser.Parser
FVecDataOut dout = new FVecDataOut(_vg, chunkStartIdx, localSetup._ncols, vecIdStart, enums(_eKey,localSetup._ncols));
CustomParser p = localSetup.parser();
// assume 2x inflation rate
//if( localSetup._pType.parallelParseSupported )
if( localSetup._pType.parallelParseSupported )
try{p.streamParse(is, dout);}catch(IOException e){throw new RuntimeException(e);}

try{p.streamParse2(is, dout);}catch(IOException e){throw new RuntimeException(e);}
else
try{p.streamParse(is, dout);}catch(Exception e){throw new RuntimeException(e);}

// Parse all internal "chunks", until we drain the zip-stream dry. Not
// real chunks, just flipping between 32K buffers. Fills up the single
// very large NewChunk.
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/water/parser/CsvParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,7 @@ public CsvParser clone(){
// current token.
if ((state != EXPECT_COND_LF) && (state != POSSIBLE_EMPTY_LINE)) {
c = CHAR_LF;
Log.warn("Unexpected end of row, adding NA's for remaining column values.");
if (!firstChunk) Log.warn("Row entry exceeded 4MB in size, exceeded current parse limit.");
if (!firstChunk) Log.warn("Row entry exceeded " + bits.length + " bytes in size, exceeded current parse limit.");
continue MAIN_LOOP;
}
break MAIN_LOOP; // Else we are just done
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/water/parser/CustomParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public DataOut streamParse( final InputStream is, final DataOut dout) throws Exc
// ------------------------------------------------------------------------
// Zipped file; no parallel decompression; decompress into local chunks,
// parse local chunks; distribute chunks later.
public DataOut streamParse( final InputStream is, final StreamDataOut dout) throws IOException {
public DataOut streamParse2( final InputStream is, final StreamDataOut dout) throws IOException {
// All output into a fresh pile of NewChunks, one per column
if(_setup._pType.parallelParseSupported){
StreamData din = new StreamData(is);
Expand Down

0 comments on commit 84687d0

Please sign in to comment.