hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject svn commit: r782505 - in /hadoop/hbase/trunk: ./ src/java/org/apache/hadoop/hbase/client/ src/java/org/apache/hadoop/hbase/master/ src/java/org/apache/hadoop/hbase/regionserver/ src/test/org/apache/hadoop/hbase/
Date Mon, 08 Jun 2009 02:23:59 GMT
Author: nitay
Date: Mon Jun  8 02:23:59 2009
New Revision: 782505

URL: http://svn.apache.org/viewvc?rev=782505&view=rev
Log:
HBASE-1491 ZooKeeper errors: "Client has seen zxid 0xe our last zxid is 0xd"

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=782505&r1=782504&r2=782505&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Mon Jun  8 02:23:59 2009
@@ -166,6 +166,7 @@
    HBASE-1493  New TableMapReduceUtil methods should be static (Billy Pearson
                via Andrew Purtell)
    HBASE-1486  BLOCKCACHE always on even when disabled (Lars George via Stack)
+   HBASE-1491  ZooKeeper errors: "Client has seen zxid 0xe our last zxid is 0xd"
 
   IMPROVEMENTS
    HBASE-1089  Add count of regions on filesystem to master UI; add percentage

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=782505&r1=782504&r2=782505&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java Mon
Jun  8 02:23:59 2009
@@ -113,6 +113,19 @@
     }
   }
 
+  /**
+   * Delete information for all connections.
+   * @param stopProxy
+   */
+  public static void deleteAllConnections(boolean stopProxy) {
+    synchronized (HBASE_INSTANCES) {
+      for (TableServers t : HBASE_INSTANCES.values()) {
+        if (t != null) {
+          t.close(stopProxy);
+        }
+      }
+    }
+  }
 
   /* Encapsulates finding the servers for an HBase instance */
   private static class TableServers implements ServerConnection, HConstants, Watcher {
@@ -205,7 +218,10 @@
     }
 
     private synchronized void resetZooKeeper() {
-      zooKeeperWrapper = null;
+      if (zooKeeperWrapper != null) {
+        zooKeeperWrapper.close();
+        zooKeeperWrapper = null;
+      }
     }
 
     // Used by master and region servers during safe mode only
@@ -1054,6 +1070,7 @@
         master = null;
         masterChecked = false;
       }
+      resetZooKeeper();
       if (stopProxy) {
         synchronized (servers) {
           for (HRegionInterface i: servers.values()) {

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java?rev=782505&r1=782504&r2=782505&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java Mon Jun  8 02:23:59
2009
@@ -424,7 +424,9 @@
     }
     server.stop();                      // Stop server
     regionManager.stop();
-    
+
+    zooKeeperWrapper.close();
+
     // Join up with all threads
     LOG.info("HMaster main thread exiting");
   }

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=782505&r1=782504&r2=782505&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Mon
Jun  8 02:23:59 2009
@@ -669,6 +669,8 @@
     }
     join();
 
+    zooKeeperWrapper.close();
+
     if (shutdownHDFS.get()) {
       runThread(this.hdfsShutdownThread,
           this.conf.getLong("hbase.dfs.shutdown.wait", 30000));

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java?rev=782505&r1=782504&r2=782505&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java Mon Jun  8 02:23:59
2009
@@ -26,6 +26,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import org.apache.hadoop.hbase.client.HConnectionManager;
 import org.apache.hadoop.hbase.master.HMaster;
 import org.apache.hadoop.hbase.regionserver.HRegionServer;
 import org.apache.hadoop.hbase.regionserver.HRegion;
@@ -172,6 +173,7 @@
     if (this.hbaseCluster != null) {
       this.hbaseCluster.shutdown();
     }
+    HConnectionManager.deleteAllConnections(false);
   }
 
   /**



Mime
View raw message