ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stoa...@apache.org
Subject ambari git commit: AMBARI-20044. NullPointerException after server restart in case not all hosts were joined (magyari_sandor)
Date Tue, 18 Apr 2017 10:31:17 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 327db732e -> 943fac128


AMBARI-20044. NullPointerException after server restart in case not all hosts were joined
(magyari_sandor)


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

Branch: refs/heads/branch-2.4
Commit: 943fac128e208ebe5c7aeec1569a81bbbe79c01b
Parents: 327db73
Author: Sandor Magyari <smagyari@hortonworks.com>
Authored: Thu Feb 16 16:22:59 2017 +0100
Committer: Toader, Sebastian <stoader@hortonworks.com>
Committed: Tue Apr 18 08:30:38 2017 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/ambari/server/topology/HostRequest.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/943fac12/ambari-server/src/main/java/org/apache/ambari/server/topology/HostRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/HostRequest.java
b/ambari-server/src/main/java/org/apache/ambari/server/topology/HostRequest.java
index 2136b68..e5f5e05 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/topology/HostRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/HostRequest.java
@@ -299,7 +299,7 @@ public class HostRequest implements Comparable<HostRequest> {
     for (HostRoleCommand logicalTask : logicalTasks.values()) {
       // set host on command detail if it is set to null
       String commandDetail = logicalTask.getCommandDetail();
-      if (commandDetail != null && commandDetail.contains("null")) {
+      if (commandDetail != null && commandDetail.contains("null") && hostname
!= null) {
         logicalTask.setCommandDetail(commandDetail.replace("null", hostname));
       }
       Long physicalTaskId = physicalTasks.get(logicalTask.getTaskId());


Mime
View raw message