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:53:51 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 0a18bff11 -> f6ba59a47


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

Branch: refs/heads/branch-2.4
Commit: f6ba59a47f327ca7f301c63fdfb8cd3b5862dd23
Parents: 0a18bff
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:53:28 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/f6ba59a4/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