virajjasani commented on a change in pull request #2899:
URL: https://github.com/apache/hbase/pull/2899#discussion_r563017635



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
##########
@@ -222,8 +223,12 @@ public void setMasterRpcServices(MasterRpcServices 
masterRpcServices) {
   private long getRegionSize(HRegionInfo hri) {
     ServerName sn = masterServices.getAssignmentManager().getRegionStates().
       getRegionServerOfRegion(hri);
-    RegionLoad regionLoad = masterServices.getServerManager().getLoad(sn).
-      getRegionsLoad().get(hri.getRegionName());
+    ServerLoad load = masterServices.getServerManager().getLoad(sn);
+    if (load == null) {
+      LOG.debug(hri.getRegionNameAsString() + " was not found on any server");

Review comment:
       > @virajjasani I see what you mean but theoretically it could also be 
possible that this region is online elsewhere in which case the log is 
misleading
   
   Hmm, I was thinking just the line above this where we get ServerName from 
AM, retrieves us regions hosting server, so was wondering in order for region 
to quickly transition and become online by the time we reach here might not be 
possible?
   
   ```
       ServerName sn = masterServices.getAssignmentManager().getRegionStates().
         getRegionServerOfRegion(hri);
   ```
   One thing to figure out is what does this call return in case region is 
already in transition when we call this.
   
   Anyways, good to reword accordingly in the log. Agree on it @bharathv .




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