caroliney14 commented on a change in pull request #2762:
URL: https://github.com/apache/hbase/pull/2762#discussion_r543848809



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
##########
@@ -3549,11 +3554,24 @@ public void updateRegionsInTransitionMetrics() {
       if (oldestRITTime < ritTime) {
         oldestRITTime = ritTime;
       }
+      if (counter < 500) { // Record 500 oldest RITs
+        oldestRITHashesAndStates.add(
+          state.getRegion().getRegionNameAsString() + ":" + 
state.getState().name()
+        );
+      }
+      counter += 1;
     }
     if (this.metricsAssignmentManager != null) {
       this.metricsAssignmentManager.updateRITOldestAge(oldestRITTime);
       this.metricsAssignmentManager.updateRITCount(totalRITs);
       
this.metricsAssignmentManager.updateRITCountOverThreshold(totalRITsOverThreshold);
+
+      LOG.debug("Oldest RIT hashes and states: " + 
oldestRITHashesAndStates.toString());
+      long time = EnvironmentEdgeManager.currentTime();
+      if ((time - ritThreshold / 2) >= this.lastRITHashMetricUpdate) {

Review comment:
       > Though I do think it's a good idea for limiting the logging. Should 
the LOG.debug statement be in here?
   
   yes it is for the reason you stated. will add the comment and move 
`LOG.debug` under this condition. maybe the other stuff can be moved outside.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to