You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@helix.apache.org by GitBox <gi...@apache.org> on 2019/08/02 04:32:42 UTC
[GitHub] [helix] lei-xia commented on a change in pull request #369: Add the workaround fix for assigning partitions when instance weight …
lei-xia 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_r309978280
##########
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:
Add methods into a class just for testing is not quite recommended. If you have to do that, setting fields to protected are a bit better than adding more codes here?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services