public static void deletePgPortEphemeralNode(ServerName sn, int port, boolean isMaster) { try { ZKUtil.deleteNode( ZooKeeperAdmin.getZooKeeperWatcher(), getPgPortEphemeralNodePath(sn, port, isMaster)); } catch (KeeperException e) { throw DbException.convert(e); } }
public static void createPgPortEphemeralNode(ServerName sn, int port, boolean isMaster) { try { ZKUtil.createEphemeralNodeAndWatch( ZooKeeperAdmin.getZooKeeperWatcher(), getPgPortEphemeralNodePath(sn, port, isMaster), HConstants.EMPTY_BYTE_ARRAY); } catch (KeeperException e) { throw DbException.convert(e); } }