joshelser 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_r375478018
##########
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:
This catch seems to be changing the semantics of this method. Instead of the
`Future` having an exception thrown, it will always return a `List<String>`.
This is a smell as we have to determine success/failure based on the values in
that list.
I assume this is an inadvertent introduction with the Function being passed
to map not allowing an exception to be thrown?
----------------------------------------------------------------
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