You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2012/12/19 21:01:08 UTC

svn commit: r1424065 - in /accumulo/branches/1.4: ./ src/ src/core/ src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooReader.java src/server/

Author: ecn
Date: Wed Dec 19 20:01:08 2012
New Revision: 1424065

URL: http://svn.apache.org/viewvc?rev=1424065&view=rev
Log:
ACCUMULO-408 merge from trunk

Modified:
    accumulo/branches/1.4/   (props changed)
    accumulo/branches/1.4/src/   (props changed)
    accumulo/branches/1.4/src/core/   (props changed)
    accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooReader.java
    accumulo/branches/1.4/src/server/   (props changed)

Propchange: accumulo/branches/1.4/
------------------------------------------------------------------------------
  Merged /accumulo/trunk:r1424060

Propchange: accumulo/branches/1.4/src/
------------------------------------------------------------------------------
  Merged /accumulo/trunk/src:r1424060

Propchange: accumulo/branches/1.4/src/core/
------------------------------------------------------------------------------
  Merged /accumulo/trunk/src/core:r1424060

Modified: accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooReader.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooReader.java?rev=1424065&r1=1424064&r2=1424065&view=diff
==============================================================================
--- accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooReader.java (original)
+++ accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooReader.java Wed Dec 19 20:01:08 2012
@@ -18,6 +18,7 @@ package org.apache.accumulo.core.zookeep
 
 import java.util.List;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.accumulo.core.client.Instance;
 import org.apache.zookeeper.KeeperException;
@@ -77,12 +78,12 @@ public class ZooReader implements IZooRe
   
   @Override
   public void sync(final String path) throws KeeperException, InterruptedException {
-    final int[] rc = { 0 };
+    final AtomicInteger rc = new AtomicInteger();
     final AtomicBoolean waiter = new AtomicBoolean(false);
     getZooKeeper().sync(path, new VoidCallback() {
       @Override
       public void processResult(int code, String arg1, Object arg2) {
-        rc[0] = code;
+        rc.set(code);
         synchronized (waiter) {
           waiter.set(true);
           waiter.notifyAll();
@@ -92,7 +93,7 @@ public class ZooReader implements IZooRe
       while (!waiter.get())
         waiter.wait();
     }
-    Code code = Code.get(rc[0]);
+    Code code = Code.get(rc.get());
     if (code != KeeperException.Code.OK) {
       throw KeeperException.create(code);
     }

Propchange: accumulo/branches/1.4/src/server/
------------------------------------------------------------------------------
  Merged /accumulo/trunk/src/server:r1424060