openinx 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_r329349104
##########
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:
The closed / opening region won't be RIT state ? if so , then we should
minus the closed region & opening region etc.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services