> On Oct. 28, 2016, 9:32 a.m., Nate Cole wrote:
> > ambari-server/src/main/resources/upgrade-pack.xsd, line 147
> > <https://reviews.apache.org/r/53251/diff/1/?file=1548002#file1548002line147>
> >
> >     Java side doesn't allow for more than one task per execute-stage.

Nice catch!


> On Oct. 28, 2016, 9:32 a.m., Nate Cole wrote:
> > ambari-server/src/main/resources/upgrade-pack.xsd, line 106
> > <https://reviews.apache.org/r/53251/diff/1/?file=1548002#file1548002line106>
> >
> >     I thought we were allowing multiple conditions for both Group and 
> > ExecuteStage?

We're not (yet). I figured that multiple conditions could be AND or OR ... so 
when we want to add that, I think it's best to do it like so:

<and>
  <condition>
  <condition>
  <or>
    <condition>
    <condition>
  </or>
</and>

... something we can design and chat about later. For now, the requirement 
seems only to be a single condition.


> On Oct. 28, 2016, 9:32 a.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConditionProcessor.java,
> >  line 75
> > <https://reviews.apache.org/r/53251/diff/1/?file=1547981#file1547981line75>
> >
> >     Can use MapUtils.isEmpty()

But then I don't get to show off my null-first-check-is-better-performing 
knowledge :) ... I'll fix it.


> On Oct. 28, 2016, 9:32 a.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Condition.java,
> >  lines 39-50
> > <https://reviews.apache.org/r/53251/diff/1/?file=1547980#file1547980line39>
> >
> >     Only a matter of time before someone wants to add a custom condition 
> > class.  Could add CLASS or something here with a Condition interface that 
> > can take the cluster as an argument.

That's true - we can have CLASS as a new type and enforce some contract on it. 
However, since it wasn't being used current I didn't think we wanted to enforce 
a design for a requirement we don't have. Do you think we need to add it now?


- Jonathan


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


On Oct. 28, 2016, 12:01 a.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53251/
> -----------------------------------------------------------
> 
> (Updated Oct. 28, 2016, 12:01 a.m.)
> 
> 
> Review request for Ambari, Nate Cole and Robert Levas.
> 
> 
> Bugs: AMBARI-18726
>     https://issues.apache.org/jira/browse/AMBARI-18726
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Add a way to compute whether an execute-stage should be included, other than 
> the simple service/component check.  
> 
> For example some stage should only be executed if the cluster has Kerberos 
> enabled.  This can be determined using the {{cluster-env/security_enabled}} 
> flag; or (better yet) the {{Cluster}}'s {{securityType}} property, which 
> would be set to "KERBEROS".
> 
> Currently the only filter is based on service and component, which does not 
> work in the case of Kerberos since Kerberos can be enabled without needing to 
> install the KERBEROS service or the KERBEROS_CLIENT component. This will 
> happen if the Kerberos identities are managed manually rather than 
> configuring Ambari to do it by integrating with a supported KDC.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
>  d83aaa2 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/SecurityType.java 
> dc52c4e 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java
>  2f616e7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java 
> 3a2dc89 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java
>  80bb26c 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Condition.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConditionProcessor.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Grouping.java
>  be1f469 
>   
> ambari-server/src/main/resources/stacks/HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml
>  e3bb29d 
>   
> ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml
>  87afdbc 
>   
> ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml
>  e082f72 
>   
> ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml
>  ed81582 
>   ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml 
> 3cc0a65 
>   ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml 
> e8e00f0 
>   ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.4.xml 
> 790e5dc 
>   
> ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
>  01e0601 
>   
> ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
>  2925b64 
>   
> ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml
>  266c71b 
>   ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.3.xml 
> 8b00893 
>   ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml 
> 6cc1106 
>   ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml 
> b0b78a0 
>   
> ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.4.xml
>  d1e1059 
>   
> ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml
>  9021761 
>   ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.4.xml 
> 390f18e 
>   ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml 
> 6af7767 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
>  5e3561a 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml 
> b02cbad 
>   ambari-server/src/main/resources/upgrade-pack.xsd b02d941 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
>  d644a09 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/stack/upgrade/StageWrapperBuilderTest.java
>  267932c 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_direction.xml
>  92fd0b2 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_nonrolling_new_stack.xml
>  789df2e 
>   ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test.xml 
> 5e02b15 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_checks.xml
>  c6d8bbe 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_nonrolling.xml
>  36f8062 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_partial.xml
>  5d8ef01 
>   
> ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_to_new_stack.xml
>  91770fb 
>   ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test.xml 
> 021c73a 
>   
> ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_15388.xml
>  d1dc62d 
>   
> ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml
>  273f619 
>   
> ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_conditions.xml
>  PRE-CREATION 
>   
> ambari-server/src/test/resources/stacks_with_upgrade_cycle/HDP/2.2.0/upgrades/upgrade_test_15388.xml
>  905def5 
> 
> Diff: https://reviews.apache.org/r/53251/diff/
> 
> 
> Testing
> -------
> 
> PENDING
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>

Reply via email to