Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7381B200B2D for ; Thu, 16 Jun 2016 19:37:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 721E5160A51; Thu, 16 Jun 2016 17:37:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BB34C1602C5 for ; Thu, 16 Jun 2016 19:37:45 +0200 (CEST) Received: (qmail 19085 invoked by uid 500); 16 Jun 2016 17:37:44 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 19074 invoked by uid 99); 16 Jun 2016 17:37:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2016 17:37:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7B5FEDFDEF; Thu, 16 Jun 2016 17:37:44 +0000 (UTC) From: amansinha100 To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #518: DRILL-4653.json - Malformed JSON should not stop th... Content-Type: text/plain Message-Id: <20160616173744.7B5FEDFDEF@git1-us-west.apache.org> Date: Thu, 16 Jun 2016 17:37:44 +0000 (UTC) archived-at: Thu, 16 Jun 2016 17:37:46 -0000 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. ---