hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasan...@apache.org
Subject hive git commit: HIVE-13405 : Fix Connection Leak in OrcRawRecordMerger (Thomas Poepping via Prasanth J)
Date Wed, 13 Apr 2016 18:29:06 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-2.0 8528c6352 -> 4160f4a67


HIVE-13405 : Fix Connection Leak in OrcRawRecordMerger (Thomas Poepping via Prasanth J)

Signed-off-by: Ashutosh Chauhan <hashutosh@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/4160f4a6
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/4160f4a6
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/4160f4a6

Branch: refs/heads/branch-2.0
Commit: 4160f4a6718846825ef51ff416c5d90aa304ee3b
Parents: 8528c63
Author: Thomas Poepping <poeppt@amazon.com>
Authored: Mon Apr 4 13:47:00 2016 -0800
Committer: Prasanth Jayachandran <prasanthj@apache.org>
Committed: Wed Apr 13 13:28:49 2016 -0500

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/ql/io/orc/OrcRawRecordMerger.java     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/4160f4a6/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRawRecordMerger.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRawRecordMerger.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRawRecordMerger.java
index f495be2..1fce282 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRawRecordMerger.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRawRecordMerger.java
@@ -546,13 +546,11 @@ public class OrcRawRecordMerger implements AcidInputFormat.RawReader<OrcStruct>{
                                          Path deltaFile) throws IOException {
     Path lengths = OrcRecordUpdater.getSideFile(deltaFile);
     long result = Long.MAX_VALUE;
-    try {
-      FSDataInputStream stream = fs.open(lengths);
+    try (FSDataInputStream stream = fs.open(lengths)) {
       result = -1;
       while (stream.available() > 0) {
         result = stream.readLong();
       }
-      stream.close();
       return result;
     } catch (IOException ioe) {
       return result;


Mime
View raw message