private static String getClusterId(byte[] data) throws DeserializationException { if (data == null || data.length == 0) { return null; } data = removeMetaData(data); return ClusterId.parseFrom(data).toString(); }
clusterId = ClusterId.parseFrom(content); } catch (DeserializationException e) { throw new IOException("content=" + Bytes.toString(content), e);
public static String readClusterIdZNode(ZKWatcher watcher) throws KeeperException { if (ZKUtil.checkExists(watcher, watcher.getZNodePaths().clusterIdZNode) != -1) { byte [] data; try { data = ZKUtil.getData(watcher, watcher.getZNodePaths().clusterIdZNode); } catch (InterruptedException e) { Thread.currentThread().interrupt(); return null; } if (data != null) { try { return ClusterId.parseFrom(data).toString(); } catch (DeserializationException e) { throw ZKUtil.convert(e); } } } return null; }
private static String getClusterId(byte[] data) throws DeserializationException { if (data == null || data.length == 0) { return null; } data = removeMetaData(data); return ClusterId.parseFrom(data).toString(); }
private static String getClusterId(byte[] data) throws DeserializationException { if (data == null || data.length == 0) { return null; } data = removeMetaData(data); return ClusterId.parseFrom(data).toString(); }
public static String readClusterIdZNode(ZooKeeperWatcher watcher) throws KeeperException { if (ZKUtil.checkExists(watcher, watcher.clusterIdZNode) != -1) { byte [] data; try { data = ZKUtil.getData(watcher, watcher.clusterIdZNode); } catch (InterruptedException e) { Thread.currentThread().interrupt(); return null; } if (data != null) { try { return ClusterId.parseFrom(data).toString(); } catch (DeserializationException e) { throw ZKUtil.convert(e); } } } return null; }
clusterId = ClusterId.parseFrom(content); } catch (DeserializationException e) { throw new IOException("content=" + Bytes.toString(content), e);
public static String readClusterIdZNode(ZKWatcher watcher) throws KeeperException { if (ZKUtil.checkExists(watcher, watcher.getZNodePaths().clusterIdZNode) != -1) { byte [] data; try { data = ZKUtil.getData(watcher, watcher.getZNodePaths().clusterIdZNode); } catch (InterruptedException e) { Thread.currentThread().interrupt(); return null; } if (data != null) { try { return ClusterId.parseFrom(data).toString(); } catch (DeserializationException e) { throw ZKUtil.convert(e); } } } return null; }