hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject hadoop git commit: YARN-7375. Possible NPE in RMWebapp when HA is enabled and the active RM fails. Contributed by Chandni Singh.
Date Fri, 27 Oct 2017 15:28:32 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-3.0 2510fc180 -> e084d4355


YARN-7375. Possible NPE in  RMWebapp when HA is enabled and the active RM fails. Contributed
by Chandni Singh.

(cherry picked from commit 792388e1c0ebaeb01db194412e30c08c0144b77c)


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

Branch: refs/heads/branch-3.0
Commit: e084d435502352d3962c539b4306ab2b5d579734
Parents: 2510fc1
Author: Sunil G <sunilg@apache.org>
Authored: Fri Oct 27 20:53:57 2017 +0530
Committer: Sunil G <sunilg@apache.org>
Committed: Fri Oct 27 20:54:58 2017 +0530

----------------------------------------------------------------------
 .../hadoop/yarn/server/resourcemanager/webapp/dao/AppInfo.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e084d435/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/AppInfo.java
----------------------------------------------------------------------
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/AppInfo.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/AppInfo.java
index db62914..4365eee 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/AppInfo.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/AppInfo.java
@@ -300,19 +300,19 @@ public class AppInfo {
       if (!deSelects.contains(DeSelectType.TIMEOUTS)) {
         Map<ApplicationTimeoutType, Long> applicationTimeouts =
             app.getApplicationTimeouts();
+        timeouts = new AppTimeoutsInfo();
         if (applicationTimeouts.isEmpty()) {
           // If application is not set timeout, lifetime should be sent
           // as default with expiryTime=UNLIMITED and remainingTime=-1
           AppTimeoutInfo timeoutInfo = new AppTimeoutInfo();
           timeoutInfo.setTimeoutType(ApplicationTimeoutType.LIFETIME);
-          timeouts = new AppTimeoutsInfo();
           timeouts.add(timeoutInfo);
         } else {
           for (Map.Entry<ApplicationTimeoutType, Long> entry : app
               .getApplicationTimeouts().entrySet()) {
             AppTimeoutInfo timeout = new AppTimeoutInfo();
             timeout.setTimeoutType(entry.getKey());
-            long timeoutInMillis = entry.getValue().longValue();
+            long timeoutInMillis = entry.getValue();
             timeout.setExpiryTime(Times.formatISO8601(timeoutInMillis));
             if (app.isAppInCompletedStates()) {
               timeout.setRemainingTime(0);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message