wchevreuil commented on a change in pull request #18: HBASE-22567 - HBCK2 
addMissingRegionsToMeta
URL: 
https://github.com/apache/hbase-operator-tools/pull/18#discussion_r320815997
 
 

 ##########
 File path: hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
 ##########
 @@ -164,6 +178,102 @@ int setRegionState(String region, RegionState.State 
newState)
     return EXIT_FAILURE;
   }
 
+  Map<TableName,List<Path>> reportTablesWithMissingRegionsInMeta(String... 
nameSpaceOrTable)
+      throws Exception {
+    Map<TableName,List<Path>> report;
+    try(final MetaFixer metaFixer = new MetaFixer(this.conf)){
+      List<String> names = nameSpaceOrTable != null ? 
Arrays.asList(nameSpaceOrTable) : null;
+      report = metaFixer.reportTablesMissingRegions(names);
+    } catch (Exception e) {
+      LOG.error("Error reporting missing regions: ", e);
+      throw e;
+    }
+    if(LOG.isDebugEnabled()) {
 
 Review comment:
   I want to avoid _formatMissingRegionsInMetaReport(report)_ from being 
evaluated, if not in debug. Although, if not in debug, no message would be 
logged, it would still call _formatMissingRegionsInMetaReport(report)_ 
unnecessarily.

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


With regards,
Apache Git Services

Reply via email to