> On Jan. 11, 2017, 12:18 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java,
> > lines 119-124
> > <https://reviews.apache.org/r/55391/diff/1/?file=1601797#file1601797line119>
> >
> > Sigh :) Can we make jira to move RCO to something real instead of this
> > parsing madness.
Yes, yes we can. I did like your idea about making it a specific structure:
```
"overrides": {
"host_ordered_upgrade": {
"DATANODE-START": "merge|replace|…"
```
Which then then be applied via rco.appyOverrides("host_ordered_upgrade") ...
but that would require some extra code to parse and for the caller to know it
was an override (as opposed to a section).
And at the end of the day, if we're going to make this a real DTO which can be
properly parsed, that work would have been throw away. Anyway - I'll make the
Jira.
- Jonathan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55391/#review161272
-----------------------------------------------------------
On Jan. 10, 2017, 4:24 p.m., Jonathan Hurley wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55391/
> -----------------------------------------------------------
>
> (Updated Jan. 10, 2017, 4:24 p.m.)
>
>
> Review request for Ambari, Nate Cole, Robert Levas, and Sid Wagle.
>
>
> Bugs: AMBARI-19448
> https://issues.apache.org/jira/browse/AMBARI-19448
>
>
> Repository: ambari
>
>
> Description
> -------
>
> As of AMBARI-19435, HOU now uses the role command ordering to determine how
> to start components on a host. This is because some components (such as
> NodeManager and DataNode) require their masters to be online first in order
> to register correctly. When co-located on the same host, masters and slaves
> must be started in the correct order.
>
> However, some ordering defined on the stack will not work for HOU. For
> example, the stack doesn't enforce that NameNode start before DataNode. This
> is because in a normal start command, the DataNode can wait for up to 30
> minutes for the NameNode to come online. During an upgrade, the upgrade logic
> waits to ensure that the DataNode is online and registered before moving on.
> Since the role ordering allows DataNode to start first, this start always
> fails during an upgrade.
>
> In order to allow this custom ordering, a new section was added for upgrades
> to the role_command_order.json.
>
> ```
> {
> "_comment" : "Record format:",
> "_comment" : "blockedRole-blockedCommand: [blockerRole1-blockerCommand1 ...
> ",
> "general_deps" : {
> ...
> },
> "host_ordered_upgrade" : {
> "DATANODE-START": ["NAMENODE-START"]
> }
> ```
>
>
> Diffs
> -----
>
>
> ambari-server/src/main/java/org/apache/ambari/server/metadata/CachedRoleCommandOrderProvider.java
> 7cf197b
>
> ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java
> cebc1b7
>
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/StackRoleCommandOrder.java
> b660ec1
>
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/HostOrderGrouping.java
> abb2aab
> ambari-server/src/main/resources/stacks/HDP/2.5/role_command_order.json
> 5a9825d
>
> ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleCommandOrderTest.java
> f0a40c9
> ambari-server/src/test/resources/stacks/HDP/2.2.0/role_command_order.json
> faaee6e
>
> Diff: https://reviews.apache.org/r/55391/diff/
>
>
> Testing
> -------
>
> PENDING...
>
>
> Thanks,
>
> Jonathan Hurley
>
>