You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2015/05/01 02:07:08 UTC

[1/4] hbase git commit: HBASE-13601 Connection leak during log splitting. (Abhishek Singh Chouhan)

Repository: hbase
Updated Branches:
  refs/heads/branch-1 dc28ded74 -> 62c55a635
  refs/heads/branch-1.0 659ff6a42 -> 402840dfe
  refs/heads/branch-1.1 6b0fbd811 -> 4b6a9d7d1
  refs/heads/master aabf6ea2f -> 235dc9734


HBASE-13601 Connection leak during log splitting. (Abhishek Singh Chouhan)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/235dc973
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/235dc973
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/235dc973

Branch: refs/heads/master
Commit: 235dc9734f032945331c5a4a03ff2d69d170669d
Parents: aabf6ea
Author: Lars Hofhansl <la...@apache.org>
Authored: Thu Apr 30 17:05:05 2015 -0700
Committer: Lars Hofhansl <la...@apache.org>
Committed: Thu Apr 30 17:05:05 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/wal/WALFactory.java     | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/235dc973/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
index 5dc1dde..c19f8c9 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
@@ -278,6 +278,7 @@ public class WALFactory {
       long startWaiting = EnvironmentEdgeManager.currentTime();
       long openTimeout = timeoutMillis + startWaiting;
       int nbAttempt = 0;
+      FSDataInputStream stream = null;
       while (true) {
         try {
           if (lrClass != ProtobufLogReader.class) {
@@ -286,7 +287,7 @@ public class WALFactory {
             reader.init(fs, path, conf, null);
             return reader;
           } else {
-            FSDataInputStream stream = fs.open(path);
+            stream = fs.open(path);
             // Note that zero-length file will fail to read PB magic, and attempt to create
             // a non-PB reader and fail the same way existing code expects it to. If we get
             // rid of the old reader entirely, we need to handle 0-size files differently from
@@ -300,6 +301,14 @@ public class WALFactory {
             return reader;
           }
         } catch (IOException e) {
+          try {
+            if (stream != null) {
+              stream.close();
+            }
+          } catch (IOException exception) {
+            LOG.warn("Could not close FSDataInputStream" + exception.getMessage());
+            LOG.debug("exception details", exception);
+          }
           String msg = e.getMessage();
           if (msg != null && (msg.contains("Cannot obtain block length")
               || msg.contains("Could not obtain the last block")


[2/4] hbase git commit: HBASE-13601 Connection leak during log splitting. (Abhishek Singh Chouhan)

Posted by la...@apache.org.
HBASE-13601 Connection leak during log splitting. (Abhishek Singh Chouhan)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/62c55a63
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/62c55a63
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/62c55a63

Branch: refs/heads/branch-1
Commit: 62c55a6350ac751969221aead51b0e758617c1b2
Parents: dc28ded
Author: Lars Hofhansl <la...@apache.org>
Authored: Thu Apr 30 17:05:05 2015 -0700
Committer: Lars Hofhansl <la...@apache.org>
Committed: Thu Apr 30 17:05:24 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/wal/WALFactory.java     | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/62c55a63/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
index b8dee83..4ef320a 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
@@ -279,6 +279,7 @@ public class WALFactory {
       long startWaiting = EnvironmentEdgeManager.currentTime();
       long openTimeout = timeoutMillis + startWaiting;
       int nbAttempt = 0;
+      FSDataInputStream stream = null;
       while (true) {
         try {
           if (lrClass != ProtobufLogReader.class) {
@@ -287,7 +288,7 @@ public class WALFactory {
             reader.init(fs, path, conf, null);
             return reader;
           } else {
-            FSDataInputStream stream = fs.open(path);
+            stream = fs.open(path);
             // Note that zero-length file will fail to read PB magic, and attempt to create
             // a non-PB reader and fail the same way existing code expects it to. If we get
             // rid of the old reader entirely, we need to handle 0-size files differently from
@@ -301,6 +302,14 @@ public class WALFactory {
             return reader;
           }
         } catch (IOException e) {
+          try {
+            if (stream != null) {
+              stream.close();
+            }
+          } catch (IOException exception) {
+            LOG.warn("Could not close FSDataInputStream" + exception.getMessage());
+            LOG.debug("exception details", exception);
+          }
           String msg = e.getMessage();
           if (msg != null && (msg.contains("Cannot obtain block length")
               || msg.contains("Could not obtain the last block")


[3/4] hbase git commit: HBASE-13601 Connection leak during log splitting. (Abhishek Singh Chouhan)

Posted by la...@apache.org.
HBASE-13601 Connection leak during log splitting. (Abhishek Singh Chouhan)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4b6a9d7d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4b6a9d7d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4b6a9d7d

Branch: refs/heads/branch-1.1
Commit: 4b6a9d7d1748d0d7da4ddf47e845d974047a070e
Parents: 6b0fbd8
Author: Lars Hofhansl <la...@apache.org>
Authored: Thu Apr 30 17:05:05 2015 -0700
Committer: Lars Hofhansl <la...@apache.org>
Committed: Thu Apr 30 17:06:22 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/wal/WALFactory.java     | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/4b6a9d7d/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
index b8dee83..4ef320a 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
@@ -279,6 +279,7 @@ public class WALFactory {
       long startWaiting = EnvironmentEdgeManager.currentTime();
       long openTimeout = timeoutMillis + startWaiting;
       int nbAttempt = 0;
+      FSDataInputStream stream = null;
       while (true) {
         try {
           if (lrClass != ProtobufLogReader.class) {
@@ -287,7 +288,7 @@ public class WALFactory {
             reader.init(fs, path, conf, null);
             return reader;
           } else {
-            FSDataInputStream stream = fs.open(path);
+            stream = fs.open(path);
             // Note that zero-length file will fail to read PB magic, and attempt to create
             // a non-PB reader and fail the same way existing code expects it to. If we get
             // rid of the old reader entirely, we need to handle 0-size files differently from
@@ -301,6 +302,14 @@ public class WALFactory {
             return reader;
           }
         } catch (IOException e) {
+          try {
+            if (stream != null) {
+              stream.close();
+            }
+          } catch (IOException exception) {
+            LOG.warn("Could not close FSDataInputStream" + exception.getMessage());
+            LOG.debug("exception details", exception);
+          }
           String msg = e.getMessage();
           if (msg != null && (msg.contains("Cannot obtain block length")
               || msg.contains("Could not obtain the last block")


[4/4] hbase git commit: HBASE-13601 Connection leak during log splitting. (Abhishek Singh Chouhan)

Posted by la...@apache.org.
HBASE-13601 Connection leak during log splitting. (Abhishek Singh Chouhan)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/402840df
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/402840df
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/402840df

Branch: refs/heads/branch-1.0
Commit: 402840dfea7bfbd80f2b2ad987add1efa0189ae6
Parents: 659ff6a
Author: Lars Hofhansl <la...@apache.org>
Authored: Thu Apr 30 17:05:05 2015 -0700
Committer: Lars Hofhansl <la...@apache.org>
Committed: Thu Apr 30 17:07:03 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/wal/WALFactory.java     | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/402840df/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
index b8dee83..4ef320a 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java
@@ -279,6 +279,7 @@ public class WALFactory {
       long startWaiting = EnvironmentEdgeManager.currentTime();
       long openTimeout = timeoutMillis + startWaiting;
       int nbAttempt = 0;
+      FSDataInputStream stream = null;
       while (true) {
         try {
           if (lrClass != ProtobufLogReader.class) {
@@ -287,7 +288,7 @@ public class WALFactory {
             reader.init(fs, path, conf, null);
             return reader;
           } else {
-            FSDataInputStream stream = fs.open(path);
+            stream = fs.open(path);
             // Note that zero-length file will fail to read PB magic, and attempt to create
             // a non-PB reader and fail the same way existing code expects it to. If we get
             // rid of the old reader entirely, we need to handle 0-size files differently from
@@ -301,6 +302,14 @@ public class WALFactory {
             return reader;
           }
         } catch (IOException e) {
+          try {
+            if (stream != null) {
+              stream.close();
+            }
+          } catch (IOException exception) {
+            LOG.warn("Could not close FSDataInputStream" + exception.getMessage());
+            LOG.debug("exception details", exception);
+          }
           String msg = e.getMessage();
           if (msg != null && (msg.contains("Cannot obtain block length")
               || msg.contains("Could not obtain the last block")