ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Fernandez (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-8970) Custom Actions for Namenode to execute tasks by calling a python script
Date Wed, 31 Dec 2014 21:50:13 GMT
Alejandro Fernandez created AMBARI-8970:
-------------------------------------------

             Summary: Custom Actions for Namenode to execute tasks by calling a python script
                 Key: AMBARI-8970
                 URL: https://issues.apache.org/jira/browse/AMBARI-8970
             Project: Ambari
          Issue Type: Technical task
          Components: ambari-server
    Affects Versions: 2.0.0
            Reporter: Alejandro Fernandez
            Assignee: Alejandro Fernandez
             Fix For: 2.0.0


Currently, the upgrade-2.2.xml file, which contains the Upgrade Pack, defines the exact commands
to run for the Namenode prepare and finalize steps.
The downside of having this logic in the xml file is that it makes it difficult to maintain,
and is not as powerful as being able to run the commands by using Python and its functions.
Therefore, it is preferable for the ExecuteTask to be able to invoke a function inside a script.

The plan is for Namenode to have functions for prepare and finalize, and for the upgrade pack
to contain something like,

Masters Group,
{code}
    <service name="HDFS">
      <component name="NAMENODE">
        <pre-upgrade>
          <task xsi:type="execute" hosts="master">
            <script>scripts/namenode.py</script>
            <function>prepare_rolling_upgrade</function>
          </task>
        </pre-upgrade>
     </component>
   </service>
{code}

While the Cluster Group has,
{code}
      <execute-stage service="HDFS" component="NAMENODE" title="Execute HDFS Finalize">
        <task xsi:type="execute" hosts="master">
          <script>scripts/namenode.py</script>
          <function>finalize_rolling_upgrade</function>
        </task>
      </execute-stage>
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message