hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r779689 - in /hadoop/hbase/trunk/bin: HBase.rb hirb.rb
Date Thu, 28 May 2009 17:34:52 GMT
Author: apurtell
Date: Thu May 28 17:34:51 2009
New Revision: 779689

URL: http://svn.apache.org/viewvc?rev=779689&view=rev
Log:
HBASE-1494 HBaseAdmin.getClusterStatus; minor formatting change for shell support

Modified:
    hadoop/hbase/trunk/bin/HBase.rb
    hadoop/hbase/trunk/bin/hirb.rb

Modified: hadoop/hbase/trunk/bin/HBase.rb
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/bin/HBase.rb?rev=779689&r1=779688&r2=779689&view=diff
==============================================================================
--- hadoop/hbase/trunk/bin/HBase.rb (original)
+++ hadoop/hbase/trunk/bin/HBase.rb Thu May 28 17:34:51 2009
@@ -271,6 +271,18 @@
         for server in status.getDeadServerNames()
           puts("    %s" % [ server ])
         end
+      elsif format != nil and format == "simple"
+        puts("%d live servers" % [ status.getServers() ])
+        for server in status.getServerInfo()
+          puts("    %s:%d %d" % \
+            [ server.getServerAddress().getHostname(),  \
+              server.getServerAddress().getPort(), server.getStartCode() ])
+          puts("        %s" % [ server.getLoad().toString() ])
+        end
+        puts("%d dead servers" % [ status.getDeadServers() ])
+        for server in status.getDeadServerNames()
+          puts("    %s" % [ server ])
+        end
       else
         puts("%d servers, %d dead, %.4f average load" % \
           [ status.getServers(), status.getDeadServers(), \

Modified: hadoop/hbase/trunk/bin/hirb.rb
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/bin/hirb.rb?rev=779689&r1=779688&r2=779689&view=diff
==============================================================================
--- hadoop/hbase/trunk/bin/hirb.rb (original)
+++ hadoop/hbase/trunk/bin/hirb.rb Thu May 28 17:34:51 2009
@@ -237,11 +237,12 @@
            hbase> scan 't1', {COLUMNS => ['c1', 'c2'], LIMIT => 10, \\
              STARTROW => 'xyz'}
 
- status    Show cluster status. Can be 'simple' or 'detailed'. The default is
-           'simple'. Examples:
+ status    Show cluster status. Can be 'summary', 'simple', or 'detailed'. The
+           default is 'summary'. Examples:
            
            hbase> status
            hbase> status 'simple'
+           hbase> status 'summary'
            hbase> status 'detailed'
 
  shutdown  Shut down the cluster.
@@ -342,7 +343,7 @@
   admin().close_region(regionName, server)
 end
 
-def status(format = 'simple')
+def status(format = 'summary')
   admin().status(format)
 end
 



Mime
View raw message