hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1557273 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ZNodeClearer.java
Date Fri, 10 Jan 2014 22:44:48 GMT
Author: apurtell
Date: Fri Jan 10 22:44:48 2014
New Revision: 1557273

URL: http://svn.apache.org/r1557273
Log:
HBASE-10310. ZNodeCleaner session expired for /hbase/master (Samir Ahmic)

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ZNodeClearer.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ZNodeClearer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ZNodeClearer.java?rev=1557273&r1=1557272&r2=1557273&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ZNodeClearer.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ZNodeClearer.java Fri Jan
10 22:44:48 2014
@@ -18,12 +18,6 @@
 
 package org.apache.hadoop.hbase;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
-import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
-
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
 import java.io.File;
@@ -32,6 +26,12 @@ import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
+import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
+
 /**
  * <p>Contains a set of methods for the collaboration between the start/stop scripts
and the
  * servers. It allows to delete immediately the znode when the master or the regions server
crashes.
@@ -146,6 +146,7 @@ public class ZNodeClearer {
     String znodeFileContent;
     try {
       znodeFileContent = ZNodeClearer.readMyEphemeralNodeOnDisk();
+      return MasterAddressTracker.deleteIfEquals(zkw, znodeFileContent);
     } catch (FileNotFoundException fnfe) {
       // If no file, just keep going -- return success.
       LOG.warn("Can't find the znode file; presume non-fatal", fnfe);
@@ -156,7 +157,5 @@ public class ZNodeClearer {
     } finally {
       zkw.close();
     }
-
-    return MasterAddressTracker.deleteIfEquals(zkw, znodeFileContent);
   }
 }



Mime
View raw message