hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject git commit: HBASE-9746 Addendum.
Date Tue, 26 Aug 2014 17:57:56 GMT
Repository: hbase
Updated Branches:
  refs/heads/master aada70053 -> e27a427f9


HBASE-9746 Addendum.


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

Branch: refs/heads/master
Commit: e27a427f9be88df6225564911cba585bd9eda5ff
Parents: aada700
Author: Lars Hofhansl <larsh@apache.org>
Authored: Tue Aug 26 10:51:08 2014 -0700
Committer: Lars Hofhansl <larsh@apache.org>
Committed: Tue Aug 26 10:56:55 2014 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/e27a427f/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
index 519e04c..0614bfe 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
@@ -130,7 +130,7 @@ public class RecoverableZooKeeper {
 
   /**
    * Try to create a Zookeeper connection. Turns any exception encountered into a
-   * {@link KeeperException.OperationTimeoutException} so it can retried.
+   * KeeperException.OperationTimeoutException so it can retried.
    * @return The created Zookeeper connection object
    * @throws KeeperException
    */
@@ -138,8 +138,8 @@ public class RecoverableZooKeeper {
     if (this.zk == null) {
       try {
         this.zk = new ZooKeeper(quorumServers, sessionTimeout, watcher);
-      } catch (Exception uhe) {
-        LOG.warn("Unable to create ZooKeeper Connection", uhe);
+      } catch (IOException ex) {
+        LOG.warn("Unable to create ZooKeeper Connection", ex);
         throw new KeeperException.OperationTimeoutException();
       }
     }
@@ -152,6 +152,8 @@ public class RecoverableZooKeeper {
       LOG.info("Closing dead ZooKeeper connection, session" +
         " was: 0x"+Long.toHexString(zk.getSessionId()));
       zk.close();
+      // reset the Zookeeper connection
+      zk = null;
     }
     checkZk();
     LOG.info("Recreated a ZooKeeper, session" +


Mime
View raw message