Browse Source

AMBARI-15696: BulkCommand stop NodeManagers stops the wrong component (dili)

Di Li 9 years ago
parent
commit
10371363d2

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java

@@ -340,7 +340,7 @@ public class ComponentInfo {
     if (autoDeploy != null ? !autoDeploy.equals(that.autoDeploy) : that.autoDeploy != null) return false;
     if (cardinality != null ? !cardinality.equals(that.cardinality) : that.cardinality != null) return false;
     if (versionAdvertised != that.versionAdvertised) return false;
-    if (decommissionAllowed != that.decommissionAllowed) return false;
+    if (decommissionAllowed != null ? !decommissionAllowed.equals(that.decommissionAllowed) : that.decommissionAllowed != null) return false;
     if (category != null ? !category.equals(that.category) : that.category != null) return false;
     if (clientConfigFiles != null ? !clientConfigFiles.equals(that.clientConfigFiles) : that.clientConfigFiles != null)
       return false;

+ 5 - 5
ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml

@@ -90,6 +90,11 @@
             <scriptType>PYTHON</scriptType>
             <timeout>1200</timeout>
           </commandScript>
+           <bulkCommands>
+             <displayName>NodeManagers</displayName>
+             <!-- Used by decommission and recommission -->
+             <masterComponent>RESOURCEMANAGER</masterComponent>
+           </bulkCommands>
           <logs>
             <log>
               <logId>yarn_nodemanager</logId>
@@ -217,11 +222,6 @@
             <scriptType>PYTHON</scriptType>
             <timeout>1200</timeout>
           </commandScript>
-          <bulkCommands>
-            <displayName>NodeManagers</displayName>
-            <!-- Used by decommission and recommission -->
-            <masterComponent>RESOURCEMANAGER</masterComponent>
-          </bulkCommands>
         </component>
 
         <component>