You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/09/29 11:07:38 UTC

[GitHub] [hbase] virajjasani commented on a change in pull request #611: HBASE-22903 : Table to RegionStatesCount metrics - Use for broken alter_status command

virajjasani commented on a change in pull request #611: HBASE-22903 : Table to RegionStatesCount metrics - Use for broken alter_status command
URL: https://github.com/apache/hbase/pull/611#discussion_r329349422
 
 

 ##########
 File path: hbase-shell/src/main/ruby/hbase/admin.rb
 ##########
 @@ -611,16 +611,19 @@ def alter_status(table_name)
       # Table should exist
       raise(ArgumentError, "Can't find a table: #{table_name}") unless exists?(table_name)
 
-      status = Pair.new
       begin
-        status = @admin.getAlterStatus(org.apache.hadoop.hbase.TableName.valueOf(table_name))
-        if status.getSecond != 0
-          puts "#{status.getSecond - status.getFirst}/#{status.getSecond} regions updated."
+        cluster_metrics = @admin.getClusterMetrics
+        table_region_status = cluster_metrics.getTableRegionStatesCount
+                                  .get(org.apache.hadoop.hbase.TableName.valueOf(table_name))
+        if table_region_status.getTotalRegions != 0
+          updated_regions = table_region_status.getTotalRegions -
 
 Review comment:
   I believe we can minus closed region, but opening should be part of RIT already

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services