This is an automated email from the ASF dual-hosted git repository. reidchan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push: new f0b2212 HBASE-23144 Compact_rs throw wrong number of arguments f0b2212 is described below commit f0b22120a09f27c730b4a06c34a9b3f24433bd49 Author: Karthik Palanisamy <kpalanis...@hortonworks.com> AuthorDate: Fri Oct 11 00:08:57 2019 -0700 HBASE-23144 Compact_rs throw wrong number of arguments Signed-off-by: Reid Chan <reidc...@apache.org> --- hbase-shell/src/main/ruby/hbase/admin.rb | 6 +++++- hbase-shell/src/test/ruby/hbase/admin_test.rb | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/hbase-shell/src/main/ruby/hbase/admin.rb b/hbase-shell/src/main/ruby/hbase/admin.rb index b854eaf..5f4f16d 100644 --- a/hbase-shell/src/main/ruby/hbase/admin.rb +++ b/hbase-shell/src/main/ruby/hbase/admin.rb @@ -115,7 +115,11 @@ module Hbase # Requests to compact all regions on the regionserver def compact_regionserver(servername, major = false) - @admin.compactRegionServer(ServerName.valueOf(servername), major) + if major + @admin.majorCompactRegionServer(ServerName.valueOf(servername)) + else + @admin.compactRegionServer(ServerName.valueOf(servername)) + end end #---------------------------------------------------------------------------------------------- diff --git a/hbase-shell/src/test/ruby/hbase/admin_test.rb b/hbase-shell/src/test/ruby/hbase/admin_test.rb index 1461c7f..e001445 100644 --- a/hbase-shell/src/test/ruby/hbase/admin_test.rb +++ b/hbase-shell/src/test/ruby/hbase/admin_test.rb @@ -107,6 +107,16 @@ module Hbase command(:flush, s.toString) end end + #------------------------------------------------------------------------------- + define_test 'compact all regions by server name' do + servers = admin.list_liveservers + servers.each do |s| + command(:compact_rs, s.to_s) + # major compact + command(:compact_rs, s.to_s, true) + break + end + end #-------------------------------------------------------------------------------