incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1188846 - /incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java
Date Tue, 25 Oct 2011 18:18:12 GMT
Author: ecn
Date: Tue Oct 25 18:18:12 2011
New Revision: 1188846

URL: http://svn.apache.org/viewvc?rev=1188846&view=rev
Log:
ACCUMULO-67 always store the zookeeper session information as hex

Modified:
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java?rev=1188846&r1=1188845&r2=1188846&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java
Tue Oct 25 18:18:12 2011
@@ -58,7 +58,7 @@ public class ZooUtil {
       if (lastSlash == 0) path = root;
       else path = root + "/" + sa[0].substring(0, lastSlash);
       node = sa[0].substring(lastSlash + 1);
-      eid = Long.parseLong(sa[1]);
+      eid = Long.parseLong(sa[1], 16);
     }
     
     public LockID(String path, String node, long eid) {
@@ -69,12 +69,12 @@ public class ZooUtil {
     
     public String serialize(String root) {
       
-      return path.substring(root.length()) + "/" + node + "$" + eid;
+      return path.substring(root.length()) + "/" + node + "$" + Long.toHexString(eid);
     }
     
     @Override
     public String toString() {
-      return " path = " + path + " node = " + node + " eid = " + eid;
+      return " path = " + path + " node = " + node + " eid = " + Long.toHexString(eid);
     }
   }
   



Mime
View raw message