belugabehr commented on a change in pull request #911: HBASE-23379: Clean Up 
FSUtil getRegionLocalityMappingFromFS
URL: https://github.com/apache/hbase/pull/911#discussion_r355643452
 
 

 ##########
 File path: hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
 ##########
 @@ -1708,44 +1702,36 @@ public boolean accept(Path path) {
 
     FileStatus[] statusList = fs.globStatus(queryPath, pathFilter);
 
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Query Path: {} ; # list of files: {}", queryPath, 
Arrays.toString(statusList));
+    }
+
     if (null == statusList) {
       return;
-    } else {
-      LOG.debug("Query Path: " + queryPath + " ; # list of files: " +
-          statusList.length);
     }
 
     // lower the number of threads in case we have very few expected regions
-    threadPoolSize = Math.min(threadPoolSize, statusList.length);
+    final int finalThreadPoolSize = Math.min(threadPoolSize, 
statusList.length);
 
 Review comment:
   OK.  Will make requested change.  Please note that it's easier to debug when 
the arguments can be assigned 'final' and not subject to change during the 
lifespan of the method call.

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


With regards,
Apache Git Services

Reply via email to