...
Question: When do I define service in common-services vs. stacks folders?
One would define services in the common-services folder if there is possibility of the service being used in multiple stacks. For example, almost all stacks would need the HDFS service - so instead of redefining HDFS in each stack, the one defined in common-services is referenced. Likewise, if a service is never going to be shared, it can be defined in the stacks folder. Basically services defined in stacks folder are used by used containment, whereas the ones defined in common-services are used by reference.
...
You can read more about the widgets descriptor in the Enhanced Service Dashboard page.
Role Command Order
From Ambari 2.2, each service can define its own role command order by including the 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:
Code Block | ||
---|---|---|
| ||
"COMP_X-START": ["NAMENODE-START"],
"NAMENODE-STOP": ["COMP_X-STOP"]
|
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 in addition the COMP_X-START dependency on NAMENODE-START would just be added as a new dependency.
For more details on role command order, see the Role Command Order section below.
Define Stack
A stack is a versioned collection of services. Each stack is a folder is defined in ambari-server/src/main/resources/stacks source. Once installed, these stack definitions are available on the ambari-server machine at /var/lib/ambari-server/resources/stacks.
...
- HDP-2.3 / HDFS - Adding NFS_GATEWAY component, updating service version and OS specific packages
- HDP-2.2 / Storm - Deleting STORM_REST_API component, updating service version and OS specific packages
- HDP-2.3 / YARN - Deleting YARN node-label configuration from capacity-scheduler.xml
- HDP-2.3 / Kafka - Add Kafka Broker Process alert
Role Command Order
Role is another name for Component (Ex: NAMENODE, DATANODE, RESOURCEMANAGER, HBASE_MASTER, etc.)
...