i3wangyi commented on a change in pull request #369: Add the workaround fix for
assigning partitions when instance weight …
URL: https://github.com/apache/helix/pull/369#discussion_r309982285
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/rebalancer/strategy/crushMapping/CardDealingAdjustmentAlgorithmV2.java
##########
@@ -55,6 +55,26 @@ public CardDealingAdjustmentAlgorithmV2(Topology topology,
int replica, Mode mod
}
}
+ public Map<Node, Node> getInstanceFaultZone() {
+ return _instanceFaultZone;
+ }
+
+ public Map<Node, Long> getInstanceWeight() {
+ return _instanceWeight;
+ }
+
+ public long getTotalWeight() {
+ return _totalWeight;
+ }
+
+ public Map<Node, Long> getFaultZoneWeight() {
Review comment:
Making it `protected` field won't make it better. `protected` is not
designed for unit testing purpose but for inheritance and it exposes the
internal field directly. I could make the methods package private so these
methods won't be misused publicly
----------------------------------------------------------------
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]
With regards,
Apache Git Services