You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ma...@apache.org on 2017/02/17 16:35:58 UTC

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

Repository: ambari
Updated Branches:
  refs/heads/trunk c8c134ee7 -> bcf728933


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/bcf72893
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bcf72893
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bcf72893

Branch: refs/heads/trunk
Commit: bcf7289331765c6f67b99fd08a2674c90fa53589
Parents: c8c134e
Author: Sandor Magyari <sm...@hortonworks.com>
Authored: Thu Feb 16 16:22:59 2017 +0100
Committer: Sandor Magyari <sm...@hortonworks.com>
Committed: Fri Feb 17 17:35:42 2017 +0100

----------------------------------------------------------------------
 .../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/bcf72893/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 a18999b..a6f677a 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
@@ -313,7 +313,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());