ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hiroyuki Adachi <>
Subject Re: Question about adding our script at pre/post start and pre/post stop actions
Date Wed, 18 Jan 2017 06:01:22 GMT
Hi Alejandro,

Thank you for the response.
I'm using HDP, and your information of the upgrade packs is useful for me.

But, how about usual operations? (e.g. restart NameNode from Ambari)
Can I hook pre/post start, stop, and restart actions of components?
It is desirable that I can implement such actions in a similar way to the upgrade packs.

Hiroyuki Adachi

    Hi Adachisan,
    What stack are you using?
    If you're using HDP, you can modify the upgrade packs (xml files) with
    additional steps like calling functions in the python files to perform any
    additional logic.
    <service name="HDFS">
      <component name="NAMENODE">
          <task xsi:type="execute">
          <summary>Wait for HiveServer2 Connections</summary>
    def wait_for_hive(self, env):
      import params
      # Ensure that Hive Server is actually present in the cluster
    On 1/16/17, 6:46 PM, "Hiroyuki Adachi" <> wrote:
    >We want to add our script at pre/post start and pre/post stop actions.
    >When we upgrade our production environment,
    >we need to check state of NameNode and wait for completion of HiveServer2
    >connections, and so on.
    >I know that we can do that with implementing custom services,
    >but we do not willing to folk the code for such small jobs.
    >Hiroyuki Adachi

View raw message