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_r375495119
 
 

 ##########
 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:
   Indeed. Was initially trying to save on the amount of code added/copied from 
MetaTableAccessor to HBCKMetaTableAccessor, and didn't think it was necessary 
to define yet another functional interface just to overcome one of most 
annoying design flaws of java lambda interfaces.

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