drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amansinha100 <...@git.apache.org>
Subject [GitHub] drill pull request #518: DRILL-4653.json - Malformed JSON should not stop th...
Date Thu, 16 Jun 2016 17:37:44 GMT
Github user amansinha100 commented on a diff in the pull request:

    https://github.com/apache/drill/pull/518#discussion_r67389846
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/JSONRecordReader.java
---
    @@ -189,39 +194,37 @@ private long currentRecordNumberInFile() {
       public int next() {
         writer.allocate();
         writer.reset();
    -
         recordCount = 0;
         ReadState write = null;
     //    Stopwatch p = new Stopwatch().start();
    -    try{
    -      outside: while(recordCount < DEFAULT_ROWS_PER_BATCH) {
    -        writer.setPosition(recordCount);
    -        write = jsonReader.write(writer);
    -
    -        if(write == ReadState.WRITE_SUCCEED) {
    +   // try
    +   // {
    +      outside: while(recordCount < DEFAULT_ROWS_PER_BATCH){
    +      try{
    +            writer.setPosition(recordCount);
    +            write = jsonReader.write(writer);
    +            if(write == ReadState.WRITE_SUCCEED) {
     //          logger.debug("Wrote record.");
    -          recordCount++;
    -        }else{
    +              recordCount++;
    +            }else{
     //          logger.debug("Exiting.");
    -          break outside;
    -        }
    -
    +              break outside;
    +            }
           }
    -
    -      jsonReader.ensureAtLeastOneField(writer);
    -
    +      catch(Exception ex)
    +      {
    +           ++parseErrorCount;
    --- End diff --
    
    the indentations seem to be off here as well as other places.. can you make sure the indentations
match the rest of the code ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message