hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Busbey (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17988) get-active-master.rb and draining_servers.rb no longer work
Date Wed, 31 May 2017 18:19:04 GMT

    [ https://issues.apache.org/jira/browse/HBASE-17988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16031623#comment-16031623
] 

Sean Busbey commented on HBASE-17988:
-------------------------------------

I suspect this broke in 0.98.

{code}
Busbey-MBA:hbase busbey$ git grep masterAddressZNode
bin/get-active-master.rb:  master_address = ZKUtil.getData(zk, zk.masterAddressZNode)
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:  private
String masterAddressZNode;
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:    masterAddressZNode
= ZKUtil.joinZNode(baseZNode,
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:    return
this.masterAddressZNode;
Busbey-MBA:hbase busbey$ git grep masterAddressZNode origin/branch-1.2
origin/branch-1.2:bin/get-active-master.rb:  master_address = ZKUtil.getData(zk, zk.masterAddressZNode)
origin/branch-1.2:hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:
 private String masterAddressZNode;
origin/branch-1.2:hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:
   masterAddressZNode = ZKUtil.joinZNode(baseZNode,
origin/branch-1.2:hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:
   return this.masterAddressZNode;
Busbey-MBA:hbase busbey$ git grep masterAddressZNode origin/branch-1.0
origin/branch-1.0:bin/get-active-master.rb:  master_address = ZKUtil.getData(zk, zk.masterAddressZNode)
origin/branch-1.0:hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:
 private String masterAddressZNode;
origin/branch-1.0:hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:
   masterAddressZNode = ZKUtil.joinZNode(baseZNode,
origin/branch-1.0:hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:
   return this.masterAddressZNode;
Busbey-MBA:hbase busbey$ git grep masterAddressZNode origin/0.98
origin/0.98:bin/get-active-master.rb:  master_address = ZKUtil.getData(zk, zk.masterAddressZNode)
origin/0.98:hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:
 private String masterAddressZNode;
origin/0.98:hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:
   masterAddressZNode = ZKUtil.joinZNode(baseZNode,
origin/0.98:hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:
   return this.masterAddressZNode;
Busbey-MBA:hbase busbey$ git grep masterAddressZNode origin/0.94
origin/0.94:bin/get-active-master.rb:  master_address = ZKUtil.getData(zk, zk.masterAddressZNode)
origin/0.94:src/main/java/org/apache/hadoop/hbase/MasterAddressTracker.java:    super(watcher,
watcher.masterAddressZNode, abortable);
origin/0.94:src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java:    if(path.equals(watcher.masterAddressZNode)
&& !master.isStopped()) {
origin/0.94:src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java:    if(path.equals(watcher.masterAddressZNode)
&& !master.isStopped()) {
origin/0.94:src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java:       
if(ZKUtil.watchAndCheckExists(watcher, watcher.masterAddressZNode)) {
origin/0.94:src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java:       
  this.watcher.masterAddressZNode, this.sn.getVersionedBytes())) {
origin/0.94:src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java:       
  ZKUtil.getDataAndWatch(this.watcher, this.watcher.masterAddressZNode);
origin/0.94:src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java:       
    ZKUtil.deleteNode(this.watcher, this.watcher.masterAddressZNode);
origin/0.94:src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java:      if
(ZKUtil.checkExists(watcher, watcher.masterAddressZNode) >= 0) {
origin/0.94:src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java:       
ZKUtil.getDataAndWatch(watcher, watcher.masterAddressZNode);
origin/0.94:src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java:       
ZKUtil.deleteNode(watcher, watcher.masterAddressZNode);
origin/0.94:src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java:      byte[]
bytes = ZKUtil.getDataAndWatch(this.watcher, this.watcher.masterAddressZNode);
origin/0.94:src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java:          (node.equals(zkw.masterAddressZNode)
== true) ||
origin/0.94:src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java:          ServerName.parseVersionedServerName(getData(zkw,
zkw.masterAddressZNode)));
origin/0.94:src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:  public
String masterAddressZNode;
origin/0.94:src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java:    masterAddressZNode
= ZKUtil.joinZNode(baseZNode,
origin/0.94:src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java:   
  ZKUtil.deleteNode(zk, zk.masterAddressZNode);
origin/0.94:src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java:   
  ZKUtil.deleteNode(zk, zk.masterAddressZNode);
origin/0.94:src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java:   
NodeDeletionListener listener = new NodeDeletionListener(zk, zk.masterAddressZNode);
origin/0.94:src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java:   
ZKUtil.deleteNode(zk, zk.masterAddressZNode);
origin/0.94:src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java:   
ZKUtil.deleteNode(zk, zk.masterAddressZNode);
origin/0.94:src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java:   
  ServerName.parseVersionedServerName(ZKUtil.getData(zk, zk.masterAddressZNode));
origin/0.94:src/test/java/org/apache/hadoop/hbase/regionserver/TestMasterAddressManager.java:
   NodeCreationListener listener = new NodeCreationListener(zk, zk.masterAddressZNode);
origin/0.94:src/test/java/org/apache/hadoop/hbase/regionserver/TestMasterAddressManager.java:
   ZKUtil.createEphemeralNodeAndWatch(zk, zk.masterAddressZNode, sn.getVersionedBytes());
{code}

Note that masterAddressZNode was public in 0.94 and private as of 0.98.

> get-active-master.rb and draining_servers.rb no longer work
> -----------------------------------------------------------
>
>                 Key: HBASE-17988
>                 URL: https://issues.apache.org/jira/browse/HBASE-17988
>             Project: HBase
>          Issue Type: Bug
>          Components: scripts
>    Affects Versions: 2.0.0
>            Reporter: Mike Drob
>            Assignee: Chinmay Kulkarni
>            Priority: Critical
>             Fix For: 2.0.0
>
>
> The scripts {{bin/get-active-master.rb}} and {{bin/draining_servers.rb}} no longer work
on current master branch. Here is an example error message:
> {noformat}
> $ bin/hbase-jruby bin/get-active-master.rb 
> NoMethodError: undefined method `masterAddressZNode' for #<Java::OrgApacheHadoopHbaseZookeeper::ZooKeeperWatcher:0x1b0e9707>
>   <main> at bin/get-active-master.rb:35
> {noformat}
> My initial probing suggests that this is likely due to movement that happened in HBASE-16690.
Perhaps instead of reworking the ruby, there is similar Java functionality already existing
somewhere.
> Putting priority at critical since it's impossible to know whether users rely on the
scripts.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message