hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1134483 - in /hbase/trunk: CHANGES.txt src/main/ruby/hbase/admin.rb
Date Fri, 10 Jun 2011 23:40:38 GMT
Author: stack
Date: Fri Jun 10 23:40:38 2011
New Revision: 1134483

URL: http://svn.apache.org/viewvc?rev=1134483&view=rev
Log:
HBASE-3923 HBASE-1502 Broke Shell's status 'simple' and 'detailed'

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/ruby/hbase/admin.rb

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1134483&r1=1134482&r2=1134483&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Fri Jun 10 23:40:38 2011
@@ -120,6 +120,7 @@ Release 0.91.0 - Unreleased
    HBASE-3976  Disable block cache on compactions (Karthik Sankarachary)
    HBASE-3979  Trivial fixes in code, document (Ming Ma)
    HBASE-3794  Ability to Discard Bad HTable Puts
+   HBASE-3923  HBASE-1502 Broke Shell's status 'simple' and 'detailed'
 
   IMPROVEMENTS
    HBASE-3290  Max Compaction Size (Nicolas Spiegelberg via Stack)  

Modified: hbase/trunk/src/main/ruby/hbase/admin.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/ruby/hbase/admin.rb?rev=1134483&r1=1134482&r2=1134483&view=diff
==============================================================================
--- hbase/trunk/src/main/ruby/hbase/admin.rb (original)
+++ hbase/trunk/src/main/ruby/hbase/admin.rb Fri Jun 10 23:40:38 2011
@@ -290,13 +290,12 @@ module Hbase
         for k, v in status.getRegionsInTransition()
           puts("    %s" % [v])
         end
-        puts("%d live servers" % [ status.getServers() ])
-        for server in status.getServerInfo()
+        puts("%d live servers" % [ status.getServersSize() ])
+        for server in status.getServers()
           puts("    %s:%d %d" % \
-            [ server.getServerAddress().getHostname(),  \
-              server.getServerAddress().getPort(), server.getStartCode() ])
-          puts("        %s" % [ server.getLoad().toString() ])
-          for region in server.getLoad().getRegionsLoad()
+            [ server.getHostname(), server.getPort(), server.getStartcode() ])
+          puts("        %s" % [ status.getLoad(server).toString() ])
+          for name, region in status.getLoad(server).getRegionsLoad()
             puts("        %s" % [ region.getNameAsString() ])
             puts("            %s" % [ region.toString() ])
           end
@@ -308,14 +307,13 @@ module Hbase
       elsif format == "simple"
         load = 0
         regions = 0
-        puts("%d live servers" % [ status.getServers() ])
-        for server in status.getServerInfo()
+        puts("%d live servers" % [ status.getServersSize() ])
+        for server in status.getServers()
           puts("    %s:%d %d" % \
-            [ server.getServerAddress().getHostname(),  \
-              server.getServerAddress().getPort(), server.getStartCode() ])
-          puts("        %s" % [ server.getLoad().toString() ])
-          load += server.getLoad().getNumberOfRequests()
-          regions += server.getLoad().getNumberOfRegions()
+            [ server.getHostname(), server.getPort(), server.getStartcode() ])
+          puts("        %s" % [ status.getLoad(server).toString() ])
+          load += status.getLoad(server).getNumberOfRequests()
+          regions += status.getLoad(server).getNumberOfRegions()
         end
         puts("%d dead servers" % [ status.getDeadServers() ])
         for server in status.getDeadServerNames()
@@ -323,7 +321,7 @@ module Hbase
         end
         puts("Aggregate load: %d, regions: %d" % [ load , regions ] )
       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
 



Mime
View raw message