Github user EronWright commented on a diff in the pull request: https://github.com/apache/flink/pull/3586#discussion_r112036109 --- Diff: flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosTaskManagerParameters.java --- @@ -166,7 +191,36 @@ public static MesosTaskManagerParameters create(Configuration flinkConfig) { cpus, containerType, Option.apply(imageName), - containeredParameters); + containeredParameters, + constraints); + } + + private static List<ConstraintEvaluator> parseConstraints(String mesosConstraints) { + List<ConstraintEvaluator> constraints = new ArrayList<>(); + + if (mesosConstraints != null) { + for (String constraint : Arrays.asList(mesosConstraints.split(","))) { + if (constraint.isEmpty()) { + continue; + } + final List<String> constraintList = Arrays.asList(constraint.split(":")); + if (constraintList.size() != 2) { + continue; + } + addConstraint(constraints, constraintList); + } + } + + return constraints; + } + + private static void addConstraint(List<ConstraintEvaluator> constraints, final List<String> constraintList) { --- End diff -- Would you mind replacing `constraintList` with a pair of arguments for the attr name and value, and rename the `addConstraint` method to `addHostAttrValueConstraint`?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---