HBASE-23144 Compact_rs throw wrong number of arguments
Signed-off-by: Reid Chan <reidchan@apache.org>
This commit is contained in:
parent
16da123df4
commit
f0b22120a0
|
@ -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
|
||||||
|
|
||||||
#----------------------------------------------------------------------------------------------
|
#----------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue