-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-22819 Automatically migrate the rs group config for table after… #498
Conversation
💔 -1 overall
This message was automatically generated. |
.setRegionServerGroup(groupInfo.getName()).build(); | ||
try { | ||
pendingProcIds.add( | ||
masterServices.modifyTable(tableName, newTd, HConstants.NO_NONCE, HConstants.NO_NONCE)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just updating the meta row of the table to add group info, avoiding reopening regions when modify table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I thought about it again. New implementation will make tables all in the default group until migrating them to their belongs groups. So reopening maybe necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is the safest way...
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
TableDescriptor newTd = TableDescriptorBuilder.newBuilder(oldTd) | ||
.setRegionServerGroup(groupInfo.getName()).build(); | ||
try { | ||
pendingProcIds.add( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the user which used RSGroup feature a lot, when user restart master with new code, this migrate thing will reopen all regions... This is not friendly for user? Can we finish this job by a tool? Only use the tool to change the TableDescriptor first, then upgrade cluster to new version code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think doing things automatically will be more friendly? As users may forget to user the tool and all the table configs will be ignored...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a new issue to add document for this? And add a config for maxConcurrency? If user decide to upgrade, user can use this config to reduce the impact for availability.
💔 -1 overall
This message was automatically generated. |
hbase-server/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java
Outdated
Show resolved
Hide resolved
private static Optional<RSGroupInfo> getRSGroupInfo(MasterServices master, GetRSGroup getter, | ||
/** | ||
* Will try to get the rsgroup from {@link TableDescriptor} first, and then try to get the rsgroup | ||
* from the {@link NamespaceDescriptor}. If still not present, return empty. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems the impl didn't get rsgroup from NamespaceDescriptor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See below, you need to show all the code, include the unmodified pieces.
hbase-server/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java
Outdated
Show resolved
Hide resolved
LOG.info("Start migrating table rs group config"); | ||
while (!masterServices.isStopped()) { | ||
Collection<RSGroupInfo> groups = holder.groupName2Group.values(); | ||
boolean hasTables = groups.stream().anyMatch(r -> !r.getTables().isEmpty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When restart master again, how to avoid migrate again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the above method, we have lots of checks, and once we finish migrate one group, we will update the RSGroupInfo to remove all the tables in it.
🎊 +1 overall
This message was automatically generated. |
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
…BASE-22695 (#498) Signed-off-by: Guanghao Zhang <[email protected]>
… HBASE-22695 (apache#498) Signed-off-by: Guanghao Zhang <[email protected]>
… HBASE-22695 (apache#498) Signed-off-by: Guanghao Zhang <[email protected]>
… HBASE-22695