Ghatage commented on a change in pull request #2435:
URL: https://github.com/apache/bookkeeper/pull/2435#discussion_r504782501
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/discover/ZKRegistrationClient.java
##########
@@ -447,4 +461,46 @@ public synchronized void
unwatchReadOnlyBookies(RegistrationListener listener) {
return newBookieAddrs;
}
+ private static BookieId stripBookieIdFromPath(String path) {
+ final int slash = path.lastIndexOf('/');
+ if (slash >= 0) {
+ try {
+ return BookieId.parse(path.substring(slash + 1));
+ } catch (IllegalArgumentException e) {
+ log.warn("Cannot decode bookieId from {}", path, e);
+ }
+ }
+ return null;
+ }
+
+ private class BookieServiceInfoCacheInvalidationWatcher implements Watcher
{
+
Review comment:
How frequently can a bookieID change? What factors drive its change?
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ClientConfiguration.java
##########
@@ -1764,6 +1767,27 @@ public ClientConfiguration
setDelayEnsembleChange(boolean enabled) {
return this;
}
+ /**
+ * Whether to enable bookie address changes tracking.
+ *
+ * @return flag to enable/disable bookie address changes tracking
+ */
+ public boolean getEnableBookieAddressTracking() {
+ return getBoolean(FOLLOW_BOOKIE_ADDRESS_TRACKING, true);
+ }
+
+ /**
+ * Enable/Disable bookie address changes tracking.
+ *
+ * @param enabled
+ * flag to enable/disable bookie address changes tracking
+ * @return client configuration.
+ */
+ public ClientConfiguration setEnableBookieAddressTracking(boolean enabled)
{
Review comment:
nit: We can use this to enable/disable, so not sure if naming variable
as `enabled` is clear. It could just be `value`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]