Пример #1
0
 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);
   }
 }
Пример #2
0
 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);
   }
 }