From 2c95eb8111a7b03fd4683f740123cd4720b62c3e Mon Sep 17 00:00:00 2001 From: Weiwei Yang Date: Sat, 28 Apr 2018 17:37:37 +0800 Subject: [PATCH] YARN-8225. YARN precommit build failing in TestPlacementConstraintTransformations. Contributed by Shane Kumpf. --- .../yarn/api/resource/PlacementConstraintTransformations.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/resource/PlacementConstraintTransformations.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/resource/PlacementConstraintTransformations.java index c5d21af80f..a15b20a81e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/resource/PlacementConstraintTransformations.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/resource/PlacementConstraintTransformations.java @@ -21,6 +21,7 @@ import java.util.ListIterator; import org.apache.hadoop.classification.InterfaceAudience.Private; +import org.apache.hadoop.yarn.api.records.AllocationTagNamespaceType; import org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint; import org.apache.hadoop.yarn.api.resource.PlacementConstraint.And; import org.apache.hadoop.yarn.api.resource.PlacementConstraint.CardinalityConstraint; @@ -162,7 +163,8 @@ public AbstractConstraint visit(TargetConstraint constraint) { public AbstractConstraint visit(CardinalityConstraint constraint) { return new SingleConstraint(constraint.getScope(), constraint.getMinCardinality(), constraint.getMaxCardinality(), - new TargetExpression(TargetExpression.TargetType.ALLOCATION_TAG, null, + new TargetExpression(TargetExpression.TargetType.ALLOCATION_TAG, + AllocationTagNamespaceType.SELF.toString(), constraint.getAllocationTags())); } }