ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject ambari git commit: AMBARI-17210. Return well formatted error response while deleting host with clients installed (ajit)
Date Wed, 15 Jun 2016 21:52:56 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 9870d74fb -> c9d2f30c6


AMBARI-17210. Return well formatted error response while deleting host with clients installed
(ajit)


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

Branch: refs/heads/trunk
Commit: c9d2f30c653ee889f84eb5b6ffb13008a5b4f2bf
Parents: 9870d74
Author: Ajit Kumar <ajit@apache.org>
Authored: Wed Jun 15 14:47:03 2016 -0700
Committer: Ajit Kumar <ajit@apache.org>
Committed: Wed Jun 15 14:47:03 2016 -0700

----------------------------------------------------------------------
 .../server/controller/internal/HostResourceProvider.java    | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c9d2f30c/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
index 46fc652..de7f209 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
@@ -924,16 +924,9 @@ public class HostResourceProvider extends AbstractControllerResourceProvider
{
         List<ServiceComponentHost> list = cluster.getServiceComponentHosts(hostName);
 
         if (!list.isEmpty()) {
-
           List<String> componentsToRemove = new ArrayList<>();
           for (ServiceComponentHost sch : list) {
-            Service s = cluster.getService(sch.getServiceName());
-            ServiceComponent sc = s.getServiceComponent(sch.getServiceComponentName());
-
-            // Masters and Slaves must be deleted first. Clients are ok.
-            if (!sc.isClientComponent()) {
-              componentsToRemove.add(sch.getServiceComponentName());
-            }
+            componentsToRemove.add(sch.getServiceComponentName());
           }
 
           if (!componentsToRemove.isEmpty()) {


Mime
View raw message