You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by mp...@apache.org on 2018/05/22 15:01:12 UTC
[ambari] branch trunk updated: AMBARI-23926. Phantom null request
shows up on the bg ops for Stop All SCH. (#1350)
This is an automated email from the ASF dual-hosted git repository.
mpapirkovskyy pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 36c5955 AMBARI-23926. Phantom null request shows up on the bg ops for Stop All SCH. (#1350)
36c5955 is described below
commit 36c59558924c267f166016a113f89e1e06461bbd
Author: Myroslav Papirkovskyi <mp...@apache.org>
AuthorDate: Tue May 22 18:01:08 2018 +0300
AMBARI-23926. Phantom null request shows up on the bg ops for Stop All SCH. (#1350)
* AMBARI-23926. Phantom null request shows up on the bg ops for Stop All SCH. (mpapirkovskyy)
* AMBARI-23926. Phantom null request shows up on the bg ops for Stop All SCH. (mpapirkovskyy)
---
.../main/java/org/apache/ambari/server/events/RequestUpdateEvent.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/events/RequestUpdateEvent.java b/ambari-server/src/main/java/org/apache/ambari/server/events/RequestUpdateEvent.java
index abf367b..1ce98f0 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/events/RequestUpdateEvent.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/events/RequestUpdateEvent.java
@@ -28,6 +28,7 @@ import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
import org.apache.ambari.server.orm.entities.HostRoleCommandEntity;
import org.apache.ambari.server.orm.entities.RequestEntity;
import org.apache.ambari.server.topology.TopologyManager;
+import org.apache.ambari.server.utils.StageUtils;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -159,7 +160,8 @@ public class RequestUpdateEvent extends STOMPEvent {
this.id = id;
this.requestId = requestId;
this.status = status;
- this.hostName = hostName;
+ // AMBARI_SERVER_ACTION does not have attached host, so we use server host
+ this.hostName = (hostName == null) ? StageUtils.getHostName() : hostName;
}
public Long getId() {
--
To stop receiving notification emails like this one, please contact
mpapirkovskyy@apache.org.