Apache9 commented on code in PR #5785:
URL: https://github.com/apache/hbase/pull/5785#discussion_r1547520822
##########
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKWatcher.java:
##########
@@ -133,7 +147,25 @@ public ZKWatcher(Configuration conf, String identifier,
Abortable abortable)
*/
public ZKWatcher(Configuration conf, String identifier, Abortable abortable,
boolean canCreateBaseZNode) throws IOException,
ZooKeeperConnectionException {
- this(conf, identifier, abortable, canCreateBaseZNode, false);
+ this(conf, identifier, abortable, canCreateBaseZNode, false, null);
Review Comment:
Ditto.
##########
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java:
##########
@@ -110,6 +112,23 @@ public static RecoverableZooKeeper connect(Configuration
conf, String ensemble,
*/
public static RecoverableZooKeeper connect(Configuration conf, String
ensemble, Watcher watcher,
final String identifier) throws IOException {
+ return connect(conf, ensemble, watcher, identifier, null);
Review Comment:
Why passing null instead of create an empty ZKClientConfig? In the above
protected method, we create an empty ZKClientConfig instance...
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/HBaseReplicationEndpoint.java:
##########
@@ -193,12 +194,16 @@ private void reloadZkWatcher() throws IOException {
if (zkw != null) {
zkw.close();
}
- zkw =
- new ZKWatcher(ctx.getConfiguration(), "connection to cluster: " +
ctx.getPeerId(), this);
+ zkw = new ZKWatcher(ctx.getConfiguration(), "connection to cluster: " +
ctx.getPeerId(), this,
+ getZKClientConfig());
zkw.registerListener(new PeerRegionServerListener(this));
}
}
+ protected ZKClientConfig getZKClientConfig() {
Review Comment:
Better add some comments here to describe why we want to add this method? It
is not used directly in the hbase code base, so maybe later other developers
may decided to remove it...
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]