Apache9 commented on a change in pull request #1774:
URL: https://github.com/apache/hbase/pull/1774#discussion_r436475983



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/AsyncMetaTableAccessor.java
##########
@@ -170,26 +170,27 @@
 
   /**
    * Used to get all region locations for the specific table.
-   * @param metaTable
    * @param tableName table we're looking for, can be null for getting all 
regions
    * @return the list of region locations. The return value will be wrapped by 
a
    *         {@link CompletableFuture}.
    */
   public static CompletableFuture<List<HRegionLocation>> 
getTableHRegionLocations(
-      AsyncTable<AdvancedScanResultConsumer> metaTable, TableName tableName) {
+    AsyncTable<AdvancedScanResultConsumer> metaTable, TableName tableName,
+    boolean excludeOfflinedSplitParents) {
     CompletableFuture<List<HRegionLocation>> future = new 
CompletableFuture<>();
-    addListener(getTableRegionsAndLocations(metaTable, tableName, true), 
(locations, err) -> {
-      if (err != null) {
-        future.completeExceptionally(err);
-      } else if (locations == null || locations.isEmpty()) {
-        future.complete(Collections.emptyList());
-      } else {
-        List<HRegionLocation> regionLocations =
-          locations.stream().map(loc -> new HRegionLocation(loc.getFirst(), 
loc.getSecond()))
-            .collect(Collectors.toList());
-        future.complete(regionLocations);
-      }
-    });
+    addListener(getTableRegionsAndLocations(metaTable, tableName, 
excludeOfflinedSplitParents),

Review comment:
       At least for snapshot, we need to get the split parent.




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


Reply via email to