[2/2] git commit: AMBARI-7822. Events with Service Checks results in Exceptions in log. Null check.

2014-10-16 Thread swagle
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/7d86ffc9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7d86ffc9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7d86ffc9

Branch: refs/heads/branch-1.7.0
Commit: 7d86ffc97a5b2e8ca0fe031b2cab662b2558971c
Parents: f93722d
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Thu Oct 16 18:40:40 2014 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Thu Oct 16 18:40:40 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/7d86ffc9/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



[2/2] git commit: AMBARI-7822. Events with Service Checks results in Exceptions in log. Null check.

2014-10-16 Thread swagle
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 swa...@hortonworks.com
Authored: Thu Oct 16 18:45:45 2014 -0700
Committer: Siddharth Wagle swa...@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