ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siddharth Wagle (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-7985) Allow for server-side commands
Date Mon, 27 Oct 2014 19:59:33 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-7985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14185709#comment-14185709
] 

Siddharth Wagle commented on AMBARI-7985:
-----------------------------------------

_ With this, aren't stages ordered and guaranteed not to start unless the previous stage completes
successfully?_
Yes that will be guaranteed by the Action Execution framework.

- There is a ServiceActionManager which is invoked from ActionScehduler, I don't think we
should create separate ActionScheduler for server actions.
- Another thing that is unclear to me is, if the server action is a Host Role Command (HRC),
then this is basically something queued up to be executed by the agent running on Ambari server?
Or is it a java class that is a part of a jar file and in the class path of AmabriServer?
- If it is a conventional HRC, it should be a part of the Action queue for the server host.
(There is 1 queue of actions per host).
*Note*: In certain Ambari deployments the Amabri server might not have an agent running on
the same host as the server.

- The ActionScehduler, is non-blocking it reads stages from DB and queues up actions, the
delay is that heartbeats are resposible for dequeue and heartbeat happen every 6 seconds.

> Allow for server-side commands
> ------------------------------
>
>                 Key: AMBARI-7985
>                 URL: https://issues.apache.org/jira/browse/AMBARI-7985
>             Project: Ambari
>          Issue Type: New Feature
>          Components: ambari-server
>    Affects Versions: 2.0.0
>            Reporter: Robert Levas
>            Assignee: Robert Levas
>              Labels: ambari-server, commands, server, server-side, tasks
>             Fix For: 2.0.0
>
>
> Ambari currently handles _client-/agent-side_ commands; however there is no ability to
handle _server-side_ commands. Server-side commands should be specified as a task in a stage
and managed along with the stage.
> *Use Case:*  Generate principals and keytabs on the Ambari server before sending the
keytabs to their relevant hosts.
> *Implementation:*  To add the concept of a server-side task:
> * update {{org.apache.ambari.server.serveraction.ServerAction}} to be an _abstract class_
> ** _server-side_ tasks must implement this class 
> * reuse existing _host_role_command_ and _execution_command_ data
> ** _server-side_ tasks are to have a role of {{AMBARI_SERVER_ACTION}}
> ** _server-side_  execution command data should be encapsulated as JSON and specify the
ServerAction implementation class and any needed payload data
> * {{org.apache.ambari.server.actionmanager.ActionScheduler}} and {{org.apache.ambari.server.serveraction.ServerActionManagerImpl}}
need to be updated to handle the execution of server-side tasks
> ** each _server-side_ task should be executed in its own thread.
> *** _server_side_ tasks should be executed in (staged) order, serially - not in parallel
> *** _server_side_ tasks should ensure not to mess up _stage_ ordering



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

Mime
View raw message