wchevreuil commented on a change in pull request #53: HBASE-23791 [operator 
tools] Remove reference to I.A. Private interfa…
URL: 
https://github.com/apache/hbase-operator-tools/pull/53#discussion_r375512036
 
 

 ##########
 File path: 
hbase-hbck2/src/main/java/org/apache/hbase/FsRegionsMetaRecoverer.java
 ##########
 @@ -135,10 +134,16 @@ void putRegionInfoFromHdfsInMeta(Path region) throws 
IOException {
     List<String> nameSpaceOrTable) throws IOException {
     if(nameSpaceOrTable.size()>0) {
       InternalMetaChecker<RegionInfo> extraChecker = new 
InternalMetaChecker<>();
-      return 
extraChecker.processRegionsMetaCleanup(this::reportTablesExtraRegions, regions 
-> {
-        MetaTableAccessor.deleteRegionInfos(conn, regions);
-        return regions.stream().map(r -> 
r.getEncodedName()).collect(Collectors.toList());
-      }, nameSpaceOrTable);
+      return 
extraChecker.processRegionsMetaCleanup(this::reportTablesExtraRegions, regions 
->
+        regions.stream().map(r -> {
+          try {
+            HBCKMetaTableAccessor.deleteRegionInfo(conn, r);
+            return r.getEncodedName();
+          } catch(IOException e){
+            LOG.error("Failed to delete region: {}", r.getEncodedName());
+            return r.getEncodedName() + " (failed)";
+          }
 
 Review comment:
   Ok, just moved the iteration portion to a separate method. Two thoughts I 
actually had now:
   1) I'm deleting regions one by one, meaning, a separate `Table.delete` call 
for each region passed. We don't expect the number of extra regions to be so 
high that it would cause major performance impacts, but we could make it more 
optimal.
   2) Whilst last change gets in sync with previous semantic for the method, I 
wonder if we would rather not fail the entire delete of regions for a given 
ns/table.

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