public void setConstraint(String clusterName, String constraintType, String constraintId, String constraintAttributesMap) {
if (clusterName == null || constraintType == null || constraintId == null || constraintAttributesMap == null) {
throw new IllegalArgumentException("fail to set constraint. missing clusterName|constraintType|constraintId|constraintAttributesMap");
}
ConstraintType type = ConstraintType.valueOf(constraintType);
ConstraintItemBuilder builder = new ConstraintItemBuilder();
Map<String, String> constraintAttributes = HelixUtil.parseCsvFormatedKeyValuePairs(constraintAttributesMap);
ConstraintItem constraintItem = builder.addConstraintAttributes(constraintAttributes).build();
_admin.setConstraint(clusterName, type, constraintId, constraintItem);
}