Apache9 commented on a change in pull request #1774:
URL: https://github.com/apache/hbase/pull/1774#discussion_r446471518
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/ClientMetaTableAccessor.java
##########
@@ -164,26 +164,27 @@ private ClientMetaTableAccessor() {
/**
* 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 in the Snapshot related code, we have special support for meta
table. So at master side, we need to expose this parameter. On whether to
expose this parameter at RPC level, I'm not sure yet. In the current design,
the cache server will use the rpc method to fetch all the records in root
table, maybe it is good to set this parameter to true so they will get all the
records? Not sure.
----------------------------------------------------------------
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]