> On Aug. 14, 2015, 2:37 p.m., Nate Cole wrote:
> > ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml,
> >  lines 47-48
> > <https://reviews.apache.org/r/37461/diff/1/?file=1039760#file1039760line47>
> >
> >     This is wrong.  It's forcing a type to not be a type.  Use <group 
> > xsi:type="stop" ...>
> 
> Alejandro Fernandez wrote:
>     I wanted to use "function" as the type so that FunctionGrouping could 
> still use DefaultBuilder and it could work with any function name, "start", 
> "stop", "restart", or whatever else we cook up in the future. 
>     If I change the type to "stop", "start", or "restart", then I'll need one 
> class for every one of these, which isn't as maintainable.

I tried switching it to <group xsi:type="stop" ...> or <group 
xsi:type="restart" ...> (for my other class) and it generated a run-time error 
because the StopTask and StopGrouping class have a collision since both use the 
"stop" XmlType annotation.
RU uses "restart" for the processing task, so Stop-and-Start Upgrade cannot 
reuse "restart" as an XmlType.
I'll switch back to my original method, it was worth a try.


- Alejandro


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


On Aug. 15, 2015, midnight, Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37461/
> -----------------------------------------------------------
> 
> (Updated Aug. 15, 2015, midnight)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12755
>     https://issues.apache.org/jira/browse/AMBARI-12755
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Subtask of Epic, AMBARI-12698 (Update the stack by stopping and starting 
> services in an orchestrated fashion)
> 
> Initial commit to introduce a "nonrolling" type of Upgrade Pack, so that 
> UpgradeHelper can orchestrate it correctly during an upgrade.
> For starters, this can create a nonrolling upgrade pack for HDP 2.2.x -> 2.2.y
> 
> This is commit #1 out of many, so there are a lot of #TODO comments.
> 
> 
> Diffs
> -----
> 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/hdp_select.py
>  d0ee9ad 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
>  43bdbfe 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
>  770cc04 
>   
> ambari-server/src/main/java/org/apache/ambari/server/metadata/ActionMetadata.java
>  e821827 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java
>  86dbccd 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java 
> 5e63744 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
>  9691292 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java
>  ad84210 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/FunctionGrouping.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Grouping.java
>  a1e1fcd 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServiceCheckGrouping.java
>  4fe5e98 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StageWrapper.java
>  eac5ce5 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StageWrapperBuilder.java
>  f7b37ab 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StartTask.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StopTask.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Task.java
>  6416b57 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/UpgradeType.java
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_upgrade.py
>  610f527 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
>  1415367 
>   
> ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/rolling-upgrade-2.2.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/rolling-upgrade-2.3.xml
>  PRE-CREATION 
>   ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml 
> 72032c3 
>   ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml 
> f6823c8 
>   
> ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/rolling-upgrade-2.3.xml
>  PRE-CREATION 
>   ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.3.xml 
> 7471025 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
>  599a1f7 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
>  6267f53 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/stack/UpgradePackTest.java
>  7a1d522 
>   ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py 
> c4ff3dc 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_bucket_test.xml
>  92e8c6a 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_direction.xml
>  89a9e4f 
>   ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test.xml 
> b7a62f5 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_checks.xml
>  b4b6663 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_nonrolling.xml
>  PRE-CREATION 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_to_new_stack.xml
>  02b0ebf 
>   ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test.xml 
> 5271ae6 
>   
> ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml
>  892b9b4 
> 
> Diff: https://reviews.apache.org/r/37461/diff/
> 
> 
> Testing
> -------
> 
> Deployed a cluster, and copied my changes over, then verified that 
> registering a new version still allowed performing a Rolling Upgrade (this 
> defaulted to using the rolling upgrade pack).
> Manually edited the DB to use my nonrolling upgrade pack, and was able to 
> perform a Stop-and-Start Upgrade where the orchestration was correct.
> 
> I ran unit tests for the following classes, and they all passed.
> UpgradeActionTest
> UpgradeResourceProviderTest
> UpgradeResourceProviderHDP22Test
> UpgradeResourceDefinitionTest
> UpgradePackTest
> UpgradeCheckStackVersionTest
> UpgradeCheckOrderTest
> UpgradeItemServiceTest
> UpgradeHelperTest
> 
> Waiting for full unit test results.
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>

Reply via email to