-
Notifications
You must be signed in to change notification settings - Fork 150
HBASE-29671 [hbase-operator-tools] Support different replication peer… #156
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
base: master
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR refactors replication storage initialization to support different HBase versions by centralizing version-specific reflection logic into a new helper class.
- Removed version-specific reflection code from
ReplicationCheckerand moved it to a dedicatedReplicationStorageFactoryHelperclass - Updated
ReplicationCheckerconstructor to acceptFileSystemandConnectionparameters - Replaced direct
ReplicationStorageFactorycalls with the new helper throughout the codebase
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ReplicationStorageFactoryHelper.java | New helper class that encapsulates version-specific reflection logic for creating replication storage instances |
| ReplicationChecker.java | Simplified constructor by removing reflection logic and delegating to the new helper class |
| HBaseFsck.java | Updated calls to use the new helper class and pass additional parameters to ReplicationChecker |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
hbase-hbck2/src/main/java/org/apache/hbase/ReplicationStorageFactoryHelper.java
Outdated
Show resolved
Hide resolved
…actoryHelper.java Co-authored-by: Copilot <[email protected]>
|
💔 -1 overall
This message was automatically generated. |
|
@Apache9 I still see compilation failures when building it with 3.0.0-beta-1 or 3.0.0-beta-2-SNAPSHOT. |
|
Ah, yes, the replication queue related methods are changed... Let me think how to fix this. Seems on 3.0.0, we only need to call removeQueue(PeerId), the implementation of the method will scan all the replication queues for this peer and remove them all. |
|
For hbase 3.0.0, the layout has been changed. In the HBase table, peer id will be the first part, while on zookeeper, region server will be the first part. So in this way, we do not need to scan all the region servers's directory to find out the undelete queues. So for 3.0.0, maybe we should add a listAllPeerIds method to ReplicationQueueStorage, and once there are peer ids which should be deleted, we call removeAllQueues(peerId) to cleanup these undeletedQueues. @petersomogyi WDYT? Thanks. |
…/queue storage