hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject [04/47] hadoop git commit: YARN-3110. Few issues in ApplicationHistory web ui. Contributed by Naganarasimha G R
Date Fri, 10 Apr 2015 04:25:00 GMT
YARN-3110. Few issues in ApplicationHistory web ui. Contributed by Naganarasimha G R


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2e441d5d
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2e441d5d
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2e441d5d

Branch: refs/heads/YARN-2928
Commit: 2e441d5d6716af0ba69441b6b39d30c3d0737f32
Parents: 7b1be9e
Author: Xuan <xgong@apache.org>
Authored: Tue Apr 7 08:22:39 2015 -0700
Committer: Zhijie Shen <zjshen@apache.org>
Committed: Thu Apr 9 20:55:56 2015 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                        |  2 ++
 .../ApplicationHistoryManagerOnTimelineStore.java      |  8 +++++---
 .../hadoop/yarn/server/webapp/AppAttemptBlock.java     | 13 +++++++------
 3 files changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/2e441d5d/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 1142baf..8a0589f 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -207,6 +207,8 @@ Release 2.8.0 - UNRELEASED
     YARN-2429. TestAMRMTokens.testTokenExpiry fails Intermittently with
     error message:Invalid AMRMToken (zxu via rkanter)
 
+    YARN-3110. Few issues in ApplicationHistory web ui. (Naganarasimha G R via xgong)
+
 Release 2.7.0 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/2e441d5d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerOnTimelineStore.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerOnTimelineStore.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerOnTimelineStore.java
index 49041c7..db00d2c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerOnTimelineStore.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerOnTimelineStore.java
@@ -219,10 +219,11 @@ public class ApplicationHistoryManagerOnTimelineStore extends AbstractService
     String type = null;
     long createdTime = 0;
     long finishedTime = 0;
+    float progress = 0.0f;
     ApplicationAttemptId latestApplicationAttemptId = null;
     String diagnosticsInfo = null;
     FinalApplicationStatus finalStatus = FinalApplicationStatus.UNDEFINED;
-    YarnApplicationState state = null;
+    YarnApplicationState state = YarnApplicationState.ACCEPTED;
     ApplicationResourceUsageReport appResources = null;
     Map<ApplicationAccessType, String> appViewACLs =
         new HashMap<ApplicationAccessType, String>();
@@ -245,7 +246,7 @@ public class ApplicationHistoryManagerOnTimelineStore extends AbstractService
             ConverterUtils.toApplicationId(entity.getEntityId()),
             latestApplicationAttemptId, user, queue, name, null, -1, null, state,
             diagnosticsInfo, null, createdTime, finishedTime, finalStatus, null,
-            null, 1.0F, type, null), appViewACLs);
+            null, progress, type, null), appViewACLs);
       }
       if (entityInfo.containsKey(ApplicationMetricsConstants.QUEUE_ENTITY_INFO)) {
         queue =
@@ -279,6 +280,7 @@ public class ApplicationHistoryManagerOnTimelineStore extends AbstractService
           createdTime = event.getTimestamp();
         } else if (event.getEventType().equals(
             ApplicationMetricsConstants.FINISHED_EVENT_TYPE)) {
+          progress=1.0F;
           finishedTime = event.getTimestamp();
           Map<String, Object> eventInfo = event.getEventInfo();
           if (eventInfo == null) {
@@ -321,7 +323,7 @@ public class ApplicationHistoryManagerOnTimelineStore extends AbstractService
         ConverterUtils.toApplicationId(entity.getEntityId()),
         latestApplicationAttemptId, user, queue, name, null, -1, null, state,
         diagnosticsInfo, null, createdTime, finishedTime, finalStatus, appResources,
-        null, 1.0F, type, null), appViewACLs);
+        null, progress, type, null), appViewACLs);
   }
 
   private static ApplicationAttemptReport convertToApplicationAttemptReport(

http://git-wip-us.apache.org/repos/asf/hadoop/blob/2e441d5d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppAttemptBlock.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppAttemptBlock.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppAttemptBlock.java
index 8df94e6..8695c6c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppAttemptBlock.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppAttemptBlock.java
@@ -194,17 +194,18 @@ public class AppAttemptBlock extends HtmlBlock {
   protected void generateOverview(ApplicationAttemptReport appAttemptReport,
       Collection<ContainerReport> containers, AppAttemptInfo appAttempt,
       String node) {
+    String amContainerId = appAttempt.getAmContainerId();
     info("Application Attempt Overview")
       ._(
         "Application Attempt State:",
         appAttempt.getAppAttemptState() == null ? UNAVAILABLE : appAttempt
           .getAppAttemptState())
-      ._(
-        "AM Container:",
-        appAttempt.getAmContainerId() == null || containers == null
-            || !hasAMContainer(appAttemptReport.getAMContainerId(), containers)
-            ? null : root_url("container", appAttempt.getAmContainerId()),
-        String.valueOf(appAttempt.getAmContainerId()))
+      ._("AM Container:",
+          amContainerId == null
+              || containers == null
+              || !hasAMContainer(appAttemptReport.getAMContainerId(),
+                  containers) ? null : root_url("container", amContainerId),
+          amContainerId == null ? "N/A" : amContainerId)
       ._("Node:", node)
       ._(
         "Tracking URL:",


Mime
View raw message