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:
-
In the AD.SSM interface, open the Actions page.
-
Select the Submit action option.
-
In the Submit action pane, type the command with parameters and click Run.
The Actions page with the Submit action paneThe Actions page with the Submit action pane
NOTE
For navigation, you can use the command below, which lists all content in an HDFS directory:
|
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.