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 2021/01/12 08:29:24 UTC

[GitHub] [hbase] bharathv commented on a change in pull request #2761: HBASE-25329 Dump region hashes in logs for the regions that are stuck in transition for more than a configured amount of time

bharathv commented on a change in pull request #2761:
URL: https://github.com/apache/hbase/pull/2761#discussion_r555588791



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
##########
@@ -1425,6 +1425,13 @@ protected void update(final AssignmentManager am) {
       this.statTimestamp = EnvironmentEdgeManager.currentTime();
       update(regionStates.getRegionsStateInTransition(), statTimestamp);
       update(regionStates.getRegionFailedOpen(), statTimestamp);
+
+      if (ritsOverThreshold != null && !ritsOverThreshold.isEmpty()) {
+        LOG.trace("RIT hashes and states: {}",

Review comment:
       nit: "RITs over threshold...." ? (otherwise it appears these are all the RITs)

##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
##########
@@ -1425,6 +1425,13 @@ protected void update(final AssignmentManager am) {
       this.statTimestamp = EnvironmentEdgeManager.currentTime();
       update(regionStates.getRegionsStateInTransition(), statTimestamp);
       update(regionStates.getRegionFailedOpen(), statTimestamp);
+
+      if (ritsOverThreshold != null && !ritsOverThreshold.isEmpty()) {
+        LOG.trace("RIT hashes and states: {}",
+          ritsOverThreshold.entrySet().stream()
+            .map(e -> e.getKey() + ":" + e.getValue().getState().name())

Review comment:
       I think this can be a debug(), fwiw.
   
   Also, the pretty printing would be evaluated even if TRACE/DEBUG is disabled, so you might want to surround with a check.
   
   if (LOG.isDebugEnabled() && ritsOverThreshold != null && !ritsOverThreshold.isEmpty()) {
     LOG.debug(...
   }




----------------------------------------------------------------
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