HBASE-23144 Compact_rs throw wrong number of arguments

Signed-off-by: Reid Chan <reidchan@apache.org>
This commit is contained in:
Karthik Palanisamy 2019-10-11 00:08:57 -07:00 committed by Reid Chan
parent 16da123df4
commit f0b22120a0
2 changed files with 15 additions and 1 deletions

View File

@ -115,7 +115,11 @@ module Hbase
# Requests to compact all regions on the regionserver # Requests to compact all regions on the regionserver
def compact_regionserver(servername, major = false) 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 end
#---------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------

View File

@ -107,6 +107,16 @@ module Hbase
command(:flush, s.toString) command(:flush, s.toString)
end end
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
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------