accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [05/50] git commit: ACCUMULO-1574
Date Tue, 23 Jul 2013 16:54:30 GMT
ACCUMULO-1574


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

Branch: refs/heads/ACCUMULO-1000
Commit: a1fda97fe788be4cceb9bb10a0d2247ac0ac145c
Parents: 122b1b1
Author: Eric Newton <eric.newton@gmail.com>
Authored: Wed Jul 17 11:26:50 2013 -0400
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Wed Jul 17 11:26:50 2013 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/server/util/TabletServerLocks.java  | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a1fda97f/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java b/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java
index c3df185..dfb05d0 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java
@@ -20,8 +20,10 @@ import java.util.List;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.cli.Help;
+import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
+import org.apache.accumulo.fate.zookeeper.ZooCache;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.zookeeper.ZooLock;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
@@ -41,17 +43,20 @@ public class TabletServerLocks {
    */
   public static void main(String[] args) throws Exception {
     
-    String tserverPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZTSERVERS;
+    Instance instance = HdfsZooInstance.getInstance();
+    String tserverPath = ZooUtil.getRoot(instance) + Constants.ZTSERVERS;
     Opts opts = new Opts();
     opts.parseArgs(TabletServerLocks.class.getName(), args);
     
+    ZooCache cache = new ZooCache(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
+    
     if (opts.list) {
       IZooReaderWriter zoo = ZooReaderWriter.getInstance();
       
       List<String> tabletServers = zoo.getChildren(tserverPath);
       
       for (String tabletServer : tabletServers) {
-        byte[] lockData = ZooLock.getLockData(tserverPath + "/" + tabletServer);
+        byte[] lockData = ZooLock.getLockData(cache, tserverPath + "/" + tabletServer, null);
         String holder = null;
         if (lockData != null) {
           holder = new String(lockData);


Mime
View raw message