paul-rogers commented on a change in pull request #1892: DRILL-7437: Storage 
Plugin for Generic HTTP REST API
URL: https://github.com/apache/drill/pull/1892#discussion_r390585371
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/JSONRecordReader.java
 ##########
 @@ -253,11 +268,20 @@ private void updateRunningCount() {
     runningRecordCount += recordCount;
   }
 
+  public void setInputStream(InputStream in) {
+    this.inputStream = in;
+  }
+
   @Override
   public void close() throws Exception {
     if (stream != null) {
       stream.close();
       stream = null;
     }
+
+    if (inputStream != null) {
+      inputStream.close();
+      inputStream = null;
+    }
 
 Review comment:
   Doesn't the Jackson parser close the input stream when the parser itself is 
closed? At least, that is what I thought I found in my own JSON tests. If not, 
we've got a pile of open HDFS streams that we've never closed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to