This is an automated email from the ASF dual-hosted git repository.

cgivre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git


The following commit(s) were added to refs/heads/master by this push:
     new 949140a  DRILL-7836: Format Plugins Hang with Compressed Files
949140a is described below

commit 949140a937175612cbaf7ece3b4e856abf589283
Author: Charles Givre <[email protected]>
AuthorDate: Tue Jan 5 13:56:05 2021 -0500

    DRILL-7836: Format Plugins Hang with Compressed Files
---
 .../src/main/java/org/apache/drill/exec/store/dfs/DrillFileSystem.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/DrillFileSystem.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/DrillFileSystem.java
index 18a6211..4f72699 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/DrillFileSystem.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/DrillFileSystem.java
@@ -28,6 +28,7 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentMap;
 
 import org.apache.commons.io.IOUtils;
+import org.apache.drill.common.AutoCloseables;
 import org.apache.drill.exec.ops.OperatorStats;
 import org.apache.drill.exec.util.AssertionUtil;
 import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
@@ -818,6 +819,7 @@ public class DrillFileSystem extends FileSystem implements 
OpenFileTracker {
     } else {
       InputStream compressedStream = codec.createInputStream(open(path));
       byte[] bytes = IOUtils.toByteArray(compressedStream);
+      AutoCloseables.closeSilently(compressedStream);
       return new ByteArrayInputStream(bytes);
     }
   }

Reply via email to