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

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

Reply via email to