-
Couldn't load subscription status.
- Fork 3.4k
HBASE-25522 Remove deprecated methods in ReplicationPeerConfig #2898
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
Conversation
|
🎊 +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. |
|
Please fix the checkstyle issues? |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
Mockito cannot mock/spy because ReplicationPeerConfig is final class. Modify it back and ignore the checkstyle. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
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.
Left one comment to reuse same builder object, rest looks good.
Nice cleanup @ZhaoBQ
| ReplicationPeerConfig rpc = ReplicationPeerConfig.newBuilder().setClusterKey(KEY_ONE).build(); | ||
| admin.addReplicationPeer(ID_ONE, rpc).join(); | ||
| rpc.setReplicateAllUserTables(false); | ||
| rpc = ReplicationPeerConfig.newBuilder(rpc).setReplicateAllUserTables(false).build(); |
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.
Rather than creating a new builder from rpc, we can reuse old one.
e.g
ReplicationPeerConfigBuilder rpcBuilder = ReplicationPeerConfig.newBuilder().setClusterKey(KEY_ONE);
admin.addReplicationPeer(ID_ONE, rpcBuilder.build()).join();
rpcBuilder.setReplicateAllUserTables(false);
admin.updateReplicationPeerConfig(ID_ONE, rpcBuilder.build()).join();
Applicable to other similar places.
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.
Thanks for the nice suggestion, fix it immediately.
|
🎊 +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. |
No description provided.