zymap commented on code in PR #4057:
URL: https://github.com/apache/bookkeeper/pull/4057#discussion_r1305012424
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/RackawareEnsemblePlacementPolicyImpl.java:
##########
@@ -160,6 +161,7 @@ protected RackawareEnsemblePlacementPolicyImpl
initialize(DNSToSwitchMapping dns
int
minNumRacksPerWriteQuorum,
boolean
enforceMinNumRacksPerWriteQuorum,
boolean
ignoreLocalNodeInPlacementPolicy,
+ boolean
useHostnameResolveLocalNodePlacementPolicy,
Review Comment:
Same with above.
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/RackawareEnsemblePlacementPolicy.java:
##########
@@ -57,21 +57,23 @@ protected RackawareEnsemblePlacementPolicy
initialize(DNSToSwitchMapping dnsReso
int
minNumRacksPerWriteQuorum,
boolean
enforceMinNumRacksPerWriteQuorum,
boolean
ignoreLocalNodeInPlacementPolicy,
+ boolean
useHostnameResolveLocalNodePlacementPolicy,
Review Comment:
It is a `protected` method, changing the method signature will introduce a
break if we want to back-support the old versions. We could mark it to
deprecate this method and overload it. Then remove it in the future versions.
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java:
##########
@@ -1010,6 +1014,22 @@ public boolean getIgnoreLocalNodeInPlacementPolicy() {
return getBoolean(IGNORE_LOCAL_NODE_IN_PLACEMENT_POLICY, false);
}
+ /**
+ * Set the flag to use hostname to resolve local node placement policy.
+ * @param useHostnameResolveLocalNodePlacementPolicy
+ */
+ public void setUseHostnameResolveLocalNodePlacementPolicy(boolean
useHostnameResolveLocalNodePlacementPolicy) {
+ setProperty(USE_HOSTNAME_RESOLVE_LOCAL_NODE_PLACEMENT_POLICY,
useHostnameResolveLocalNodePlacementPolicy);
+ }
+
+ /**
+ * Get whether to use hostname to resolve local node placement policy.
+ * @return
+ */
+ public boolean getUseHostnameResolveLocalNodePlacementPolicy() {
+ return getBoolean(USE_HOSTNAME_RESOLVE_LOCAL_NODE_PLACEMENT_POLICY,
false);
+ }
Review Comment:
Since it is a client configuration, why not move it to the
ClientConfiguration?
--
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]