Esempio n. 1
0
 private void clearZooKeeperNode(int nnIndex) throws IOException {
   NameNodeInfo nni = this.nameNodes[nnIndex];
   AvatarZooKeeperClient zkClient = new AvatarZooKeeperClient(nni.conf, null);
   zkClient.clearPrimary("localhost:" + nni.httpPort);
   zkClient.clearPrimary("localhost:" + nni.nnPort);
   zkClient.clearPrimary("localhost:" + nni.nnDnPort);
   zkClient.clearPrimary("localhost:" + nni.rpcPort);
 }
Esempio n. 2
0
 private void registerZooKeeperNode(
     int nnPrimaryPort,
     int nnDnPrimaryPort,
     int httpPrimaryPort,
     int rpcPrimaryPort,
     NameNodeInfo nni)
     throws IOException {
   AvatarZooKeeperClient zkClient = new AvatarZooKeeperClient(nni.conf, null);
   zkClient.registerPrimary("localhost:" + nni.nnPort, "localhost:" + nnPrimaryPort);
   zkClient.registerPrimary("localhost:" + nni.nnDnPort, "localhost:" + nnDnPrimaryPort);
   zkClient.registerPrimary("localhost:" + nni.httpPort, "localhost:" + httpPrimaryPort);
   zkClient.registerPrimary("localhost:" + nni.rpcPort, "localhost:" + rpcPrimaryPort);
 }