Define actions in SSM

Overview

Actions in SSM are commands that are applied to data if a certain condition in a rule is met . There is a list of predefined actions for common tasks which can be found in the SSM Server UI on the Help → Action Usage page. You can also launch an action at any time you want using the action console in the UI.

Launch an action

To launch an action, follow the steps below:

  1. In the SSM Server UI, open the Smart Notebook page.

  2. In the Run Action pane, type the command with parameters and click play outline dark play outline light (or press Shift + Enter).

    A finished action
    A finished action
    A finished action
    A finished action
  3. The output of your action will be available in the same 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