I'm not sure if a documentation exists, but here's the procedure on how to
add a custom action.

To define a host level custom action for a service component, you would
have to do the following:
- Add the custom action for the service component to metainfo.xml
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml#L39-#L46
- Add the definition of the custom action in the component's script
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py#L120-#L124

Please note that the naming convention for the action in metainfo.xml is
*MY_CUSTOM_COMMAND* and the corresponding function signature in the script
would be *my_custom_command (self, env)*



On Mon, Feb 22, 2016 at 6:27 AM, Zhang Ruiqiang <[email protected]> wrote:

> Hi all:
>      I want to add a host level action, is there any document that I can
> follow?
>
> Thanks!
>
>
>
>



-- 
*Mithun Mathew* (Matt)

   - www.linkedin.com/in/mithunmatt/

Reply via email to