ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject [2/2] git commit: AMBARI-7822. Events with Service Checks results in Exceptions in log. Null check.
Date Fri, 17 Oct 2014 01:46:05 GMT
AMBARI-7822. Events with Service Checks results in Exceptions in log. Null check.


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

Branch: refs/heads/trunk
Commit: 43ab9e61f076affb0a6fc92e39053cf0e8b6d163
Parents: 383d3e7
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Thu Oct 16 18:45:45 2014 -0700
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Thu Oct 16 18:45:45 2014 -0700

----------------------------------------------------------------------
 .../server/controller/AmbariManagementControllerImpl.java       | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/43ab9e61/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 9b17352..6779205 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -1980,10 +1980,9 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
         Service s = cluster.getService(serviceName);
         // find service component host
         ServiceComponent component = getClientComponentForRunningAction(cluster, s);
-        String componentName = component.getName();
+        String componentName = component != null ? component.getName() : null;
         String clientHost = getClientHostForRunningAction(cluster, s, component);
-        String smokeTestRole =
-            actionMetadata.getServiceCheckAction(serviceName);
+        String smokeTestRole = actionMetadata.getServiceCheckAction(serviceName);
 
         if (clientHost == null || smokeTestRole == null) {
           LOG.info("Nothing to do for service check as could not find role or"


Mime
View raw message