From 7698737207b01e80b1be2b4df60363f952a1c2b4 Mon Sep 17 00:00:00 2001 From: Eric Yang Date: Thu, 3 May 2018 13:35:40 -0400 Subject: [PATCH] YARN-8226. Improved anti-affinity description in YARN Service doc. Contributed by Gour Saha --- .../resources/definition/YARN-Services-Examples.md | 10 +++++++--- .../src/site/markdown/yarn-service/YarnServiceAPI.md | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/main/resources/definition/YARN-Services-Examples.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/main/resources/definition/YARN-Services-Examples.md index a4ef2d2df8..83e558c333 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/main/resources/definition/YARN-Services-Examples.md +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/main/resources/definition/YARN-Services-Examples.md @@ -351,9 +351,13 @@ POST URL - http://localhost:8088/app/v1/services ##### GET Response JSON GET URL - http://localhost:8088/app/v1/services/hello-world -Note, that the 3 containers will come up on 3 different nodes. If there are less -than 3 NMs running in the cluster, then all 3 container requests will not be -fulfilled and the service will be in non-STABLE state. +Note, for an anti-affinity component no more than 1 container will be allocated +in a specific node. In this example, 3 containers have been requested by +component "hello". All 3 containers were allocated because the cluster had 3 or +more NMs. If the cluster had less than 3 NMs then less than 3 containers would +be allocated. In cases when the number of allocated containers are less than the +number of requested containers, the component and the service will be in +non-STABLE state. ```json { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md index 496c1a16b9..fab33c51e8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md @@ -766,9 +766,13 @@ POST URL - http://localhost:8088/app/v1/services ##### GET Response JSON GET URL - http://localhost:8088/app/v1/services/hello-world -Note, that the 3 containers will come up on 3 different nodes. If there are less -than 3 NMs running in the cluster, then all 3 container requests will not be -fulfilled and the service will be in non-STABLE state. +Note, for an anti-affinity component no more than 1 container will be allocated +in a specific node. In this example, 3 containers have been requested by +component "hello". All 3 containers were allocated because the cluster had 3 or +more NMs. If the cluster had less than 3 NMs then less than 3 containers would +be allocated. In cases when the number of allocated containers are less than the +number of requested containers, the component and the service will be in +non-STABLE state. ```json {