arshadmohammad commented on a change in pull request #2883:
URL: https://github.com/apache/hbase/pull/2883#discussion_r586360628
##########
File path:
hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java
##########
@@ -718,4 +729,49 @@ private void checkForDeadOrOnlineServers(Set<Address>
servers) throws Constraint
}
}
}
+
+ private void moveOrModifyTables(Set<TableName> tables, RSGroupInfo
targetGroup)
+ throws IOException {
+ Set<TableName> tablesToBeMoved = new HashSet<>(tables.size());
+ Set<TableDescriptor> tablesToBeModified = new HashSet<>(tables.size());
+ for (TableName tableName : tables) {
+ TableDescriptor descriptor = master.getTableDescriptors().get(tableName);
+ if (descriptor == null) {
+ LOG.error("TableDescriptor of table {} not found. "
+ + "Skipping the region movement of this table.");
+ continue;
+ }
+ if (descriptor.getRegionServerGroup().isPresent()) {
+ tablesToBeModified.add(descriptor);
+ } else {
+ tablesToBeMoved.add(tableName);
+ }
+ }
+ if (!tablesToBeMoved.isEmpty()) {
+ moveTableRegionsToGroup(tablesToBeMoved, targetGroup);
Review comment:
Handled, executing modify table and move table in parallel now.
----------------------------------------------------------------
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]