From ff550edabff1ba78b392f6e0eeb805aa3170b335 Mon Sep 17 00:00:00 2001 From: Csaba Skrabak Date: Fri, 2 Mar 2018 11:09:50 -0800 Subject: [PATCH] HBASE-19114 addendum. Split out o.a.h.h.zookeeper from hbase-server and hbase-client. Ruby scripts also used ZooKeeperWatcher. Signed-off-by: Apekshit Sharma --- bin/draining_servers.rb | 6 +++--- bin/get-active-master.rb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/draining_servers.rb b/bin/draining_servers.rb index 27cc0fa558e..0d29c19e49e 100644 --- a/bin/draining_servers.rb +++ b/bin/draining_servers.rb @@ -85,7 +85,7 @@ def addServers(_options, hostOrServers) config = HBaseConfiguration.create servers = getServerNames(hostOrServers, config) - zkw = org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.new(config, 'draining_servers', nil) + zkw = org.apache.hadoop.hbase.zookeeper.ZKWatcher.new(config, 'draining_servers', nil) parentZnode = zkw.znodePaths.drainingZNode begin @@ -102,7 +102,7 @@ def removeServers(_options, hostOrServers) config = HBaseConfiguration.create servers = getServerNames(hostOrServers, config) - zkw = org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.new(config, 'draining_servers', nil) + zkw = org.apache.hadoop.hbase.zookeeper.ZKWatcher.new(config, 'draining_servers', nil) parentZnode = zkw.znodePaths.drainingZNode begin @@ -119,7 +119,7 @@ end def listServers(_options) config = HBaseConfiguration.create - zkw = org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.new(config, 'draining_servers', nil) + zkw = org.apache.hadoop.hbase.zookeeper.ZKWatcher.new(config, 'draining_servers', nil) parentZnode = zkw.znodePaths.drainingZNode servers = ZKUtil.listChildrenNoWatch(zkw, parentZnode) diff --git a/bin/get-active-master.rb b/bin/get-active-master.rb index 0cd3d029760..d8c96fe3d4a 100644 --- a/bin/get-active-master.rb +++ b/bin/get-active-master.rb @@ -20,7 +20,7 @@ include Java java_import org.apache.hadoop.hbase.HBaseConfiguration java_import org.apache.hadoop.hbase.ServerName -java_import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher +java_import org.apache.hadoop.hbase.zookeeper.ZKWatcher java_import org.apache.hadoop.hbase.zookeeper.MasterAddressTracker # disable debug/info logging on this script for clarity @@ -30,7 +30,7 @@ org.apache.log4j.Logger.getLogger('org.apache.zookeeper').setLevel(log_level) config = HBaseConfiguration.create -zk = ZooKeeperWatcher.new(config, 'get-active-master', nil) +zk = ZKWatcher.new(config, 'get-active-master', nil) begin puts MasterAddressTracker.getMasterAddress(zk).getHostname ensure