From 4f395063bbae1636d4c59bc962916d78694b50d3 Mon Sep 17 00:00:00 2001 From: Billie Rinaldi Date: Fri, 9 Mar 2018 08:50:28 -0800 Subject: [PATCH] YARN-8000. Yarn Service component instance name shows up as component name in container record. Contributed by Chandni Singh --- .../resources/definition/YARN-Services-Examples.md | 4 ++-- .../hadoop/yarn/service/api/records/Container.java | 12 ++++++------ .../src/site/markdown/yarn-service/YarnServiceAPI.md | 4 ++-- 3 files changed, 10 insertions(+), 10 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 00b21dd60e..e4cdc7bb03 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 @@ -72,7 +72,7 @@ Note, lifetime value of -1 means unlimited lifetime. "state": "READY", "launch_time": 1504051512412, "bare_host": "10.22.8.143", - "component_name": "hello-0" + "component_instance_name": "hello-0" }, { "id": "container_e03_1503963985568_0002_01_000002", @@ -81,7 +81,7 @@ Note, lifetime value of -1 means unlimited lifetime. "state": "READY", "launch_time": 1504051536450, "bare_host": "10.22.8.143", - "component_name": "hello-1" + "component_instance_name": "hello-1" } ], "launch_command": "./start_nginx.sh", diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/api/records/Container.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/api/records/Container.java index af065424ed..1ffd85f173 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/api/records/Container.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/api/records/Container.java @@ -173,20 +173,20 @@ public void setState(ContainerState state) { } /** - * Name of the component that this container instance belongs to. + * Name of the component instance that this container instance belongs to. **/ - public Container componentName(String componentName) { - this.componentInstanceName = componentName; + public Container componentInstanceName(String componentInstanceName) { + this.componentInstanceName = componentInstanceName; return this; } - @ApiModelProperty(example = "null", value = "Name of the component that this container instance belongs to.") - @JsonProperty("component_name") + @ApiModelProperty(example = "null", value = "Name of the component instance that this container instance belongs to.") + @JsonProperty("component_instance_name") public String getComponentInstanceName() { return componentInstanceName; } - @XmlElement(name = "component_name") + @XmlElement(name = "component_instance_name") public void setComponentInstanceName(String componentInstanceName) { this.componentInstanceName = componentInstanceName; } 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 6c38680318..990f8fd6fd 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 @@ -441,7 +441,7 @@ Note, lifetime value of -1 means unlimited lifetime. "state": "READY", "launch_time": 1504051512412, "bare_host": "10.22.8.143", - "component_name": "hello-0" + "component_instance_name": "hello-0" }, { "id": "container_e03_1503963985568_0002_01_000002", @@ -450,7 +450,7 @@ Note, lifetime value of -1 means unlimited lifetime. "state": "READY", "launch_time": 1504051536450, "bare_host": "10.22.8.143", - "component_name": "hello-1" + "component_instance_name": "hello-1" } ], "launch_command": "./start_nginx.sh",