HBASE-3923 HBASE-1502 Broke Shell's status 'simple' and 'detailed'

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1134483 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-06-10 23:40:38 +00:00
parent af03bb3a99
commit 3fb6a0a7aa
2 changed files with 13 additions and 14 deletions

View File

@ -120,6 +120,7 @@ Release 0.91.0 - Unreleased
HBASE-3976 Disable block cache on compactions (Karthik Sankarachary) HBASE-3976 Disable block cache on compactions (Karthik Sankarachary)
HBASE-3979 Trivial fixes in code, document (Ming Ma) HBASE-3979 Trivial fixes in code, document (Ming Ma)
HBASE-3794 Ability to Discard Bad HTable Puts HBASE-3794 Ability to Discard Bad HTable Puts
HBASE-3923 HBASE-1502 Broke Shell's status 'simple' and 'detailed'
IMPROVEMENTS IMPROVEMENTS
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack) HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)

View File

@ -290,13 +290,12 @@ module Hbase
for k, v in status.getRegionsInTransition() for k, v in status.getRegionsInTransition()
puts(" %s" % [v]) puts(" %s" % [v])
end end
puts("%d live servers" % [ status.getServers() ]) puts("%d live servers" % [ status.getServersSize() ])
for server in status.getServerInfo() for server in status.getServers()
puts(" %s:%d %d" % \ puts(" %s:%d %d" % \
[ server.getServerAddress().getHostname(), \ [ server.getHostname(), server.getPort(), server.getStartcode() ])
server.getServerAddress().getPort(), server.getStartCode() ]) puts(" %s" % [ status.getLoad(server).toString() ])
puts(" %s" % [ server.getLoad().toString() ]) for name, region in status.getLoad(server).getRegionsLoad()
for region in server.getLoad().getRegionsLoad()
puts(" %s" % [ region.getNameAsString() ]) puts(" %s" % [ region.getNameAsString() ])
puts(" %s" % [ region.toString() ]) puts(" %s" % [ region.toString() ])
end end
@ -308,14 +307,13 @@ module Hbase
elsif format == "simple" elsif format == "simple"
load = 0 load = 0
regions = 0 regions = 0
puts("%d live servers" % [ status.getServers() ]) puts("%d live servers" % [ status.getServersSize() ])
for server in status.getServerInfo() for server in status.getServers()
puts(" %s:%d %d" % \ puts(" %s:%d %d" % \
[ server.getServerAddress().getHostname(), \ [ server.getHostname(), server.getPort(), server.getStartcode() ])
server.getServerAddress().getPort(), server.getStartCode() ]) puts(" %s" % [ status.getLoad(server).toString() ])
puts(" %s" % [ server.getLoad().toString() ]) load += status.getLoad(server).getNumberOfRequests()
load += server.getLoad().getNumberOfRequests() regions += status.getLoad(server).getNumberOfRegions()
regions += server.getLoad().getNumberOfRegions()
end end
puts("%d dead servers" % [ status.getDeadServers() ]) puts("%d dead servers" % [ status.getDeadServers() ])
for server in status.getDeadServerNames() for server in status.getDeadServerNames()
@ -323,7 +321,7 @@ module Hbase
end end
puts("Aggregate load: %d, regions: %d" % [ load , regions ] ) puts("Aggregate load: %d, regions: %d" % [ load , regions ] )
else else
puts "#{status.getServers} servers, #{status.getDeadServers} dead, #{'%.4f' % status.getAverageLoad} average load" puts "#{status.getServersSize} servers, #{status.getDeadServers} dead, #{'%.4f' % status.getAverageLoad} average load"
end end
end end