Define actions in SSM

Overview

Actions in SSM are commands that are applied to data if a certain condition in a rule is met. You can launch an action at any time you want using the Actions page in the AD.SSM UI.

For a full list of actions available in SSM, refer to the SSM Actions reference.

Launch an action

To launch an action, follow the steps below:

  1. In the AD.SSM interface, open the Actions page.

  2. Select the Submit action option.

  3. In the Submit action pane, type the command with parameters and click Run.

    The Actions page with the Submit action pane
    The Actions page with the Submit action pane
    The Actions page with the Submit action pane
    The Actions page with the Submit action pane
NOTE

For navigation, you can use the command below, which lists all content in an HDFS directory:

list -file /

Action usage example

Below, you can see how to define an action that copies files to an S3 storage.

After configuring S3 credentials, you can copy files to an S3 storage by running an action like this:

copy2s3 -file /user/sergei/demoCopyS3/f1.txt -dest s3a://develop-test-bucket/f1.txt

You can run the following command to check that a file got copied:

$ hdfs dfs -cat s3a://develop-test-bucket/f1.txt

If there are no errors, you will see the file contents.

Found a mistake? Seleсt text and press Ctrl+Enter to report it