-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58092/
-----------------------------------------------------------

Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, and 
Jonathan Hurley.


Bugs: AMBARI-20640
    https://issues.apache.org/jira/browse/AMBARI-20640


Repository: ambari


Description
-------

Some server side actions, noteably config changes, should happen only one time. 
 there are a couple of cases:


      <component name="MAPREDUCE2_CLIENT">
        <pre-upgrade>
          <task xsi:type="server_action" 
class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath">
            <summary>Verifying LZO codec path for mapreduce</summary>
          </task>
        </pre-upgrade>
      </component>

      <component name="NODEMANAGER">
        <pre-upgrade>
          <task xsi:type="configure" id="hdp_2_5_0_0_add_spark2_yarn_shuffle"/>
        </pre-upgrade>

        <pre-downgrade/>

        <upgrade>
          <task xsi:type="restart-task" />
        </upgrade>
      </component>

These server-side actions are currently being scheduled for every instance of 
MAPREDUCE2_CLIENT and NODEMANAGER.  Luckily, they're idempotent so no harm is 
being done, but it is unncessary scheduling of tasks.

Originally I had intended to add another tag to the declaration to control this 
behavior, but there actually isn't any use case that requires a server-side 
action to happen for every host.  That effort has been shelved for a later time 
if it ever becomes necessary.


Diffs
-----

  
ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ColocatedGrouping.java
 c939320a14 
  
ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/TaskWrapperBuilder.java
 bd2bf14d81 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
 483880a1b1 
  
ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
 8e5ad0aadc 
  
ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_multi_server_tasks.xml
 PRE-CREATION 


Diff: https://reviews.apache.org/r/58092/diff/1/


Testing
-------

Manual.  Automated unit tests:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23:24.474s
[INFO] Finished at: Thu Mar 30 18:52:54 EDT 2017
[INFO] Final Memory: 31M/301M
[INFO] ------------------------------------------------------------------------


Thanks,

Nate Cole

Reply via email to