Apache9 commented on a change in pull request #2626:
URL: https://github.com/apache/hbase/pull/2626#discussion_r520393431
##########
File path:
hbase-balancer/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
##########
@@ -497,12 +518,34 @@ public static void scanMeta(Connection connection,
@Nullable final byte[] startR
if (data.isEmpty()) {
continue;
}
- // Break if visit returns false.
- if (!visitor.visit(data)) {
- break;
- }
- if (++currentRow >= rowUpperLimit) {
- break;
+
+ if (!async) {
+ // Break if visit returns false.
+ if (!visitor.visit(data)) {
+ break;
+ }
+ if (++currentRow >= rowUpperLimit) {
+ break;
+ }
+ } else {
+ // creating a threadPool and submitting the visitors if 'async' is
true
Review comment:
I think what we want in AssignmentManager.loadMeta is to scan meta with
multiple threads, not process the result with a thread pool.
So I suggest that we implement a special scan meta logic for loading meta in
AssignmentManager or RegionStateStore directly, so we do not need to care about
the semantic of the return value of Visitor.visit.
----------------------------------------------------------------
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]