incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject svn commit: r1482449 - in /incubator/ambari/trunk: ./ ambari-server/src/main/java/org/apache/ambari/server/controller/ ambari-server/src/test/java/org/apache/ambari/server/controller/
Date Tue, 14 May 2013 16:49:36 GMT
Author: swagle
Date: Tue May 14 16:49:36 2013
New Revision: 1482449

URL: http://svn.apache.org/r1482449
Log:
AMBARI-2124. Hive client is not getting reconfigured when it is co-hosted with hive server/metastore.
(swagle)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
    incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1482449&r1=1482448&r2=1482449&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue May 14 16:49:36 2013
@@ -850,6 +850,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-2124. Hive client is not getting reconfigured when it is co-hosted with 
+ hive server/metastore. (swagle)
+
  AMBARI-2114. Refresh on the Service page always activates summary tab. (jaimin)
 
  AMBARI-2120. Add few logs to allow root-cause the issue where agent seems

Modified: incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java?rev=1482449&r1=1482448&r2=1482449&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
(original)
+++ incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
Tue May 14 16:49:36 2013
@@ -1875,28 +1875,15 @@ public class AmbariManagementControllerI
     for (String serviceName : services) {
       Service s = cluster.getService(serviceName);
       for (String component : s.getServiceComponents().keySet()) {
-        List<ServiceComponentHost> potentialHosts = null;
+        List<ServiceComponentHost> potentialHosts = new
+          ArrayList<ServiceComponentHost>();
         ServiceComponent sc = s.getServiceComponents().get(component);
         if (sc.isClientComponent()) {
-          potentialHosts = new ArrayList<ServiceComponentHost>();
-          // Check if the Client components are in the list of changed hosts
-          if (existingSchs != null && !existingSchs.isEmpty()) {
-            for (ServiceComponentHost potentialSch : sc
-              .getServiceComponentHosts().values()) {
-              boolean addSch = true;
-              // Ignore the Sch if same service has changed on the same host
-              for (ServiceComponentHost existingSch : existingSchs) {
-                if (potentialSch.getHostName().equals(existingSch
-                    .getHostName()) && potentialSch.getServiceName().equals
-                    (existingSch.getServiceName())) {
-                  addSch = false;
-                  break;
-                }
-              }
-              if (addSch && !potentialSch.getHostState().equals(HostState
-                .HEARTBEAT_LOST)) {
-                potentialHosts.add(potentialSch);
-              }
+          for (ServiceComponentHost potentialSch : sc
+            .getServiceComponentHosts().values()) {
+            if (!potentialSch.getHostState().equals(HostState
+              .HEARTBEAT_LOST)) {
+              potentialHosts.add(potentialSch);
             }
           }
         }
@@ -1905,8 +1892,7 @@ public class AmbariManagementControllerI
         }
       }
     }
-    LOG.info("Client hosts for reinstall : " + clientSchs.size
-      ());
+    LOG.info("Client hosts for reinstall : " + clientSchs.size());
 
     for (String sc : clientSchs.keySet()) {
       Map<State, List<ServiceComponentHost>> schMap = new

Modified: incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java?rev=1482449&r1=1482448&r2=1482449&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
(original)
+++ incubator/ambari/trunk/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
Tue May 14 16:49:36 2013
@@ -4518,7 +4518,7 @@ public class AmbariManagementControllerT
       }
     }
     Assert.assertNotNull(hdfsCmdHost3);
-    Assert.assertNull(hdfsCmdHost2);
+    Assert.assertNotNull(hdfsCmdHost2);
     ExecutionCommand execCmd = hdfsCmdHost3.getExecutionCommandWrapper()
       .getExecutionCommand();
     Assert.assertEquals(2, execCmd.getConfigurationTags().size());



Mime
View raw message