i3wangyi 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_r330727089
########## File path: helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/constraints/ConstraintBasedAlgorithmFactory.java ########## @@ -19,19 +19,34 @@ * under the License. */ +import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Properties; +import org.apache.helix.HelixManagerProperties; +import org.apache.helix.SystemPropertyKeys; import org.apache.helix.controller.rebalancer.waged.RebalanceAlgorithm; import org.apache.helix.model.ClusterConfig; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; /** * The factory class to create an instance of {@link ConstraintBasedAlgorithm} */ public class ConstraintBasedAlgorithmFactory { + private static final String PARTITION_MOVEMENT_CONSTRAINT = "PartitionMovementConstraint"; Review comment: We can only extract the string from the property file, and the `PartitionMovementConstraint` variable in `movementRatio * MODEL.get(PartitionMovementConstraint)`, what type is it? This code change is imperfect and I will just let it work at first. ---------------------------------------------------------------- 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