jiajunwang commented on a change in pull request #492: Load soft constraint 
weight from resources/properties file
URL: https://github.com/apache/helix/pull/492#discussion_r330330408
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/constraints/ConstraintBasedAlgorithmFactory.java
 ##########
 @@ -47,13 +62,17 @@ public static RebalanceAlgorithm getInstance(
     float evennessRatio = (float) evennessPreference / (evennessPreference + 
movementPreference);
     float movementRatio = (float) movementPreference / (evennessPreference + 
movementPreference);
 
-    Map<SoftConstraint, Float> softConstraints = ImmutableMap.<SoftConstraint, 
Float> builder()
-        .put(new PartitionMovementConstraint(), movementRatio)
-        .put(new InstancePartitionsCountConstraint(), 0.3f * evennessRatio)
-        .put(new ResourcePartitionAntiAffinityConstraint(), 0.1f * 
evennessRatio)
-        .put(new ResourceTopStateAntiAffinityConstraint(), 0.1f * 
evennessRatio)
-        .put(new MaxCapacityUsageInstanceConstraint(), 0.5f * 
evennessRatio).build();
+    List<SoftConstraint> l = ImmutableList.of(new 
PartitionMovementConstraint(),
 
 Review comment:
   "l" for var name is not good. Please put a meaningful name 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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org
For additional commands, e-mail: reviews-h...@helix.apache.org

Reply via email to