hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1433593 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
Date Tue, 15 Jan 2013 19:28:08 GMT
Author: tedyu
Date: Tue Jan 15 19:28:08 2013
New Revision: 1433593

URL: http://svn.apache.org/viewvc?rev=1433593&view=rev
Log:
HBASE-7562 ZKUtil: missing "else condition" in multi processing (Himanshu)


Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java?rev=1433593&r1=1433592&r2=1433593&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java Tue Jan
15 19:28:08 2013
@@ -1420,6 +1420,7 @@ public class ZKUtil {
              LOG.info("On call to ZK.multi, received exception: " + ke.toString() + "."
                + "  Attempting to run operations sequentially because"
                + " runSequentialOnMultiFailure is: " + runSequentialOnMultiFailure + ".");
+             processSequentially(zkw, ops);
              break;
            }
           default:
@@ -1428,19 +1429,24 @@ public class ZKUtil {
       } catch (InterruptedException ie) {
         zkw.interruptedException(ie);
       }
+    } else {
+      // run sequentially
+      processSequentially(zkw, ops);
     }
+  }
 
-    // run sequentially
+  private static void processSequentially(ZooKeeperWatcher zkw, List<ZKUtilOp> ops)
+      throws KeeperException, NoNodeException {
     for (ZKUtilOp op : ops) {
       if (op instanceof CreateAndFailSilent) {
-        createAndFailSilent(zkw, (CreateAndFailSilent)op);
+        createAndFailSilent(zkw, (CreateAndFailSilent) op);
       } else if (op instanceof DeleteNodeFailSilent) {
-        deleteNodeFailSilent(zkw, (DeleteNodeFailSilent)op);
+        deleteNodeFailSilent(zkw, (DeleteNodeFailSilent) op);
       } else if (op instanceof SetData) {
-        setData(zkw, (SetData)op);
+        setData(zkw, (SetData) op);
       } else {
         throw new UnsupportedOperationException("Unexpected ZKUtilOp type: "
-          + op.getClass().getName());
+            + op.getClass().getName());
       }
     }
   }



Mime
View raw message