Beispiel #1
0
 public static DistributedCacheSchema.ClusterInfo readClusterInfo(
     ZooKeeper zk, String name, boolean flag)
     throws KeeperException, InterruptedException, InvalidProtocolBufferException {
   if (flag && zk.exists("/" + name + "/info", true) == null) {
     return null;
   }
   byte[] data = zk.getData("/" + name + "/info", flag, null);
   return DistributedCacheSchema.ClusterInfo.parseFrom(data);
 }
Beispiel #2
0
 public static DistributedCacheSchema.ClusterInfo readClusterInfo(ZooKeeper zk, String name)
     throws KeeperException, InterruptedException, InvalidProtocolBufferException {
   byte[] data = zk.getData("/" + name + "/info", false, null);
   return DistributedCacheSchema.ClusterInfo.parseFrom(data);
 }