stoty commented on code in PR #6987:
URL: https://github.com/apache/hbase/pull/6987#discussion_r2087139928
##########
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java:
##########
@@ -726,6 +726,13 @@ public synchronized States getState() {
}
public synchronized ZooKeeper getZooKeeper() {
+ // Callers expect an initialized ZooKeeper instance
+ // Pre HBASE-28529 the constructor used to call checkZk()
+ try {
+ checkZk();
Review Comment:
makes sense
##########
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java:
##########
@@ -726,6 +726,13 @@ public synchronized States getState() {
}
public synchronized ZooKeeper getZooKeeper() {
+ // Callers expect an initialized ZooKeeper instance
+ // Pre HBASE-28529 the constructor used to call checkZk()
+ try {
+ checkZk();
+ } catch (Exception x) {
+ // Just return null zk
Review Comment:
OK
##########
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java:
##########
@@ -726,6 +726,13 @@ public synchronized States getState() {
}
public synchronized ZooKeeper getZooKeeper() {
Review Comment:
We probably could, but I don't think this is a performance hotspot, so I'd
just leave it as is.
--
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]