virajjasani commented on a change in pull request #2762:
URL: https://github.com/apache/hbase/pull/2762#discussion_r558358500
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
##########
@@ -3538,18 +3538,32 @@ public void updateRegionsInTransitionMetrics() {
int totalRITs = 0;
int totalRITsOverThreshold = 0;
long oldestRITTime = 0;
+ Map<String, RegionState> ritsOverThreshold = null;
int ritThreshold = this.server.getConfiguration().
getInt(HConstants.METRICS_RIT_STUCK_WARNING_THRESHOLD, 60000);
for (RegionState state: regionStates.getRegionsInTransition()) {
totalRITs++;
long ritTime = currentTime - state.getStamp();
if (ritTime > ritThreshold) { // more than the threshold
totalRITsOverThreshold++;
+ if (ritsOverThreshold == null) {
+ ritsOverThreshold = new HashMap<>();
+ }
+ ritsOverThreshold.put(state.getRegion().getEncodedName(), state);
}
if (oldestRITTime < ritTime) {
oldestRITTime = ritTime;
}
}
+ if (LOG.isDebugEnabled() && ritsOverThreshold != null &&
!ritsOverThreshold.isEmpty()) {
+ StringBuilder sb = new StringBuilder();
+ for (String regionName: ritsOverThreshold.keySet()) {
Review comment:
If you could convert this to entrySet(), that would be great (as per
findbugs)
----------------------------------------------------------------
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]