Actions are a series of predefined steps that you can use to automate jobs or processes that need to be performed often. For example, you can create an action that automatically kills any application running for more than a particular period of time.

  • Only an Admin or Data Steward type of user can create, edit, and run an action.
  • Actions can change the status of your cluster. Hence, actions should be used and configured with caution.

Click Actions > Actions from the left navigation bar to view the list of actions. The Actions page is displayed.

The following table describes the properties of an action.

Property NameDescriptionExample
NameSpecifies the name of the action that was provided while creating the action.Kill_Long_Running_Apps
Last StatusSpecifies whether the very last execution of the action had succeeded or failed.Succeeded
StepsSpecifies the number of steps used during creation of the action.3
Last ExecutionSpecifies the date and time for when the action was last executed.2020-07-28T04:35:11.828Z
ScheduledSpecifies true or false value depending on whether the execution was scheduled or not.True
Cron EntrySpecifies the cron value entered for scheduling the action.035*?**
EnabledSpecifies true or false value depending on the whether the action was enabled or not.True

Creating an Action

  1. Click the Create Connection button from the Actions page. The Create Actions page is displayed.
  2. Specify a name for the action.
  3. Specify a description for the action.
  4. Select the Enabled checkbox to enable the action.
  5. Select the Scheduled checkbox to schedule the action. The Cron Entry input box is display. Specify a Cron Entry.
  6. Specify a value in seconds for the initial delay of the action.
  7. Specify a value in seconds for the intervals between steps.
  8. Drag and drop steps from the right pane.
  9. Click the Save button to save your action.

Steps that can be configured

The below table explains the different steps that can be used to configure actions.

Step nameDescription
PlaybookExecutorExecutes a playbook available. It finds the hosts from the hostTag and executes the playbooks in those hosts.
MapInputExecutorMaps the inputs according to a passed configuration. For example, if a Step outputs a value in key 'A' and the next step needs the same value in key 'B' then this step should be a intermediate step with configuration to map key 'A' -> 'B'. The values are not touched. If a key is not found then that mapping is ignored.
ApplicationKillExecutorThis executor can kill YARN application using YARN REST apis. If a list of application ids are sent to the executor, then it iterates over the list and kills each one of them.
IdentityExecutorDo nothing executor. Passes the inputs to the output.
EmailExecutorUses the templates to create the content of the mail and then sends the mail out.
FetchMapperCountForYarnAppExecutorThis is a composite executor which uses the MongoExecutor and fetches the running applications where the mappers are greater that specified count passed as input.
FetchYarnAppExecutorThis is a composite executor which uses the MongoExecutor and ExtractFromInputExecutor to fetch the long running yarn application ids from the database. As the output it returns the list of application_ids which has been started before some time(taken as input) and is still running.
RandIntExecutorRandom Integer generator. It generates an random positive integer between 0 and a specified value(exclusive). It checks the config first for the upperBound value and the checks the input. Value passed in the input takes the precedence.
TimeInMillisExecutorGets the current time in milliseconds. Adds the offset if provided. Sets The value to the output key. It passes other inputs to the output.
PrintExecutorPrints a message passed on to this executor.
ExtractFromInputExecutorSometimes outputs from a executor is a deeply nested structure. While the next Executor may not understand the deep structure as its input. So, this executor should be placed in the middle and should be configured to extract values from the deep nested structure and attach those values to top-level keys.
This executor uses for the extraction of the values. Refer to get a guide on how to configure the extraction logic. Example of the configs:
"$[0].title": "first_title",
"$[0].author": "first_author"
SlackExecutorUses the templates to create the content of the message and then post the message to slack group.
WaitExecutorReads 'delay' from the config to get the number of seconds to wait before returning. It passes the context that is passed to it as input.
HivePartitionMergeExecutorThis executor executes a hive statement to merge partitions.

Execute Actions

Click Execute in the Actions page to execute an action immediately. To view the execution status, click View Executions. For more information on viewing executions, click view action executions.

Edit Actions

From the actions panel list, click the name of an action you want to edit. The action is displayed in the Actions page. Make your changes and click Save.

Delete Actions

From the Actions list, click from the end of an action row and select Delete to delete the action.