From afdc1d1e3a1a77ed8e52ef0eb8cdab2e2132811e Mon Sep 17 00:00:00 2001 From: hunshenshi <289517357@qq.com> Date: Wed, 10 Apr 2019 15:13:29 +0800 Subject: [PATCH] YARN-9468:Fix inaccurate documentations in Placement Constraints --- .../src/site/markdown/PlacementConstraints.md.vm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/PlacementConstraints.md.vm b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/PlacementConstraints.md.vm index c212a9d7f50..00290497ef2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/PlacementConstraints.md.vm +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/PlacementConstraints.md.vm @@ -65,7 +65,7 @@ $ yarn org.apache.hadoop.yarn.applications.distributedshell.Client -jar share/ha where **PlacementSpec** is of the form: ``` -PlacementSpec => "" | PlacementExpr;PlacementSpec +PlacementSpec => "" | PlacementExpr:PlacementSpec PlacementExpr => SourceTag,ConstraintExpr SourceTag => String(NumContainers) ConstraintExpr => SingleConstraint | CompositeConstraint @@ -92,7 +92,7 @@ zk(3),NOTIN,NODE,zk:hbase(5),IN,RACK,zk:spark(7),CARDINALITY,NODE,hbase,1,3 The above encodes three constraints: * place 3 containers with tag "zk" (standing for ZooKeeper) with node anti-affinity to each other, i.e., do not place more than one container per node (notice that in this first constraint, the SourceTag and the TargetTag of the constraint coincide); -* place 5 containers with tag "hbase" with affinity to a rack on which containers with tag "zk" are running (i.e., an "hbase" container should not be placed at a rack where an "zk" container is running, given that "zk" is the TargetTag of the second constraint); +* place 5 containers with tag "hbase" with affinity to a rack on which containers with tag "zk" are running (i.e., an "hbase" container should be placed at a rack where an "zk" container is running, given that "zk" is the TargetTag of the second constraint); * place 7 containers with tag "spark" in nodes that have at least one, but no more than three, containers with tag "hbase". Another example below demonstrates a composite form of constraint: