Commit Graph

12 Commits

Author SHA1 Message Date
Junegunn Choi 84a79dfbd4 HBASE-27030 Fix undefined local variable error in draining_servers.rb (#4427)
HBASE-21812 replaced a for-loop with an each block.
Each block introduces a new scope, so a local variable defined inside it
cannot be accessed afterwards.

  NameError: undefined local variable or method `admin' for main:Object
    getServerNames at /opt/khp/hbase/bin/draining_servers.rb:81
        addServers at /opt/khp/hbase/bin/draining_servers.rb:88
            <main> at /opt/khp/hbase/bin/draining_servers.rb:146

This commit defines the admin local variable in the current scope beforehand,
so that we can still access it after the block.

Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 2b573ae377)
2022-05-22 15:07:28 +08:00
Sakthi 789d9df170 HBASE-21812 Address ruby static analysis for shell/bin modules [2nd pass]
Signed-off-by: Sean Busbey <busbey@apache.org>
(cherry picked from commit 65caa08edc)
2019-02-03 09:53:09 -06:00
Nihal Jain 7255a1c737 HBASE-21629 draining_servers.rb is broken 2018-12-23 20:48:23 -08:00
Csaba Skrabak 671d36097f 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 <appy@apache.org>
2018-03-03 21:06:21 +05:30
Apekshit Sharma 313a65a13c HBASE-10092 Addendum. Move to slf4j. Few changes in bin/ scripts. 2017-12-21 19:26:19 -08:00
Jerry He 75d2bba739 HBASE-10367 RegionServer graceful stop / decommissioning
Signed-off-by: Jerry He <jerryjch@apache.org>
2017-10-19 22:10:52 -07:00
Mike Drob 4e9961b4fc HBASE-18238 rubocop autocorrect for bin/ 2017-08-14 14:04:43 -05:00
Chinmay Kulkarni 6012bcdd1d HBASE-17988 get-active-master.rb and draining_servers.rb no longer work
Modified jruby scripts to pick up drainingZNode and masterAddressZNode
correctly, from within znodePaths in ZooKeeperWatcher. Modified
get-active-master.rb to retrieve server name using MasterAddressTracker
instead of ZKUtil.

Tested on a standalone HBase deployment to check that the scripts work
as expected.

Signed-off-by: Sean Busbey <busbey@apache.org>
Signed-off-by: Mike Drob <mdrob@apache.org>
2017-06-20 01:11:14 -05:00
Mike Drob 140ce1453e HBASE-16196 Update to JRuby 9.1.9.0
* Get hbase-shell to use latest current JRuby release.
* Update license information to reflect the changes to jruby-complete.jar
* Update shell scripts for Ruby 1.8->2.x incompatabilities
* Update joni and jcodings to compatible versions

Signed-off-by: Sean Busbey <busbey@apache.org>
2017-05-31 11:09:07 -05:00
tedyu 9b8895ba29 HBASE-15043 region_status.rb broken with TypeError: no public constructors for Java::OrgApacheHadoopHbaseClient::HBaseAdmin (Samir Ahmic) 2015-12-29 07:06:43 -08:00
tedyu 67c6352e8a HBASE-13633 draining_servers.rb broken with NoMethodError: undefined method 'getServerInfo' (Samir Ahmic) 2015-05-06 09:28:23 -07:00
Enis Soztutar 65f6d41851 HBASE-10688 Add a draining_node script to manage nodes in draining mode
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1576856 13f79535-47bb-0310-9956-ffa450edef68
2014-03-12 19:00:47 +00:00