From 6cc0e9baa1041a9e08fe3497b35d1ea2b78c7db1 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 adc5b7a3d63..1594a6c6481 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -29,6 +29,9 @@ Release 2.7.1 - UNRELEASED YARN-3351. AppMaster tracking URL is broken in HA. (Anubhav Dhoot via kasha) + YARN-3382. Some of UserMetricsInfo metrics are incorrectly set to root + queue metrics. (Rohit Agarwal via jianhe) + Release 2.7.0 - 2015-04-20 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();