Each service can define its own role command order by including a role_command_order.json file in its service folder. The service should only specify the relationship of its components to other components. In other words, if a service only includes COMP_X, it should only list dependencies related to COMP_X. If when COMP_X starts it is dependent on the NameNode start and when the NameNode stops it should wait for COMP_X to stop, the following would be included in the role command order:
The entries in the service's role command order will be merged with the role command order defined in the stack. For example, since the stack already has a dependency for NAMENODE-STOP, in the example above COMP_X-STOP would be added to the rest of the NAMENODE-STOP dependencies and the COMP_X-START dependency on NAMENODE-START would be added as a new dependency.
Ambari uses the below sections only:
|Section Name||When Used|
|Command orders are applied in all situations|
|Command orders are applied when cluster has instance of GLUSTERFS service|
|Command orders are applied when cluster does not have instance of GLUSTERFS service|
|Command orders are applied when HDFS service is installed and JOURNALNODE component exists (HDFS HA is enabled)|
|Command orders are applied when YARN service is installed and multiple RESOURCEMANAGER host-components exist (YARN HA is enabled)|
Commands currently supported by Ambari are
For more details on role command order, see the Stack’s Role Command Order page.