From 32b01263d3c9b5469f1b7ff9f21170823a8bf10c Mon Sep 17 00:00:00 2001 From: Jian He Date: Mon, 13 Apr 2015 10:53:34 -0700 Subject: [PATCH] YARN-3382. Some of UserMetricsInfo metrics are incorrectly set to root queue metrics. Contributed by Rohit Agarwal (cherry picked from commit 944a16579fdb54c1c420162ef830ef2ac5451c69) --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../resourcemanager/webapp/dao/UserMetricsInfo.java | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 2cc883798d5..fec48e25e1d 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -129,6 +129,9 @@ Release 2.8.0 - UNRELEASED YARN-3465. Use LinkedHashMap to preserve order of resource requests. (Zhihai Xu via kasha) + YARN-3382. Some of UserMetricsInfo metrics are incorrectly set to root + queue metrics. (Rohit Agarwal via jianhe) + Release 2.7.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/UserMetricsInfo.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/UserMetricsInfo.java index 73a83d7db27..bfa5bd2937d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/UserMetricsInfo.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/UserMetricsInfo.java @@ -63,11 +63,11 @@ public class UserMetricsInfo { this.userMetricsAvailable = true; this.appsSubmitted = userMetrics.getAppsSubmitted(); - this.appsCompleted = metrics.getAppsCompleted(); - this.appsPending = metrics.getAppsPending(); - this.appsRunning = metrics.getAppsRunning(); - this.appsFailed = metrics.getAppsFailed(); - this.appsKilled = metrics.getAppsKilled(); + this.appsCompleted = userMetrics.getAppsCompleted(); + this.appsPending = userMetrics.getAppsPending(); + this.appsRunning = userMetrics.getAppsRunning(); + this.appsFailed = userMetrics.getAppsFailed(); + this.appsKilled = userMetrics.getAppsKilled(); this.runningContainers = userMetrics.getAllocatedContainers(); this.pendingContainers = userMetrics.getPendingContainers();