A bootstrap action is a custom script executed when a cluster is created to help you modify the cluster environment, install third-party software, and use your own data.
Create a small pay-as-you-go cluster first to test whether the bootstrap action works properly, and if yes, create a production cluster.
An EMR instance can be created in the following steps:
A bootstrap action can be executed at the following three time slots:
A bootstrap action will run bootstrap scripts during cluster creation and scaling. Bootstrap scripts will be executed in sequence in the order of addition, and there can be up to 16 bootstrap actions.
When you add, edit, or delete a bootstrap action in an existing cluster, differences may exist between it and the new environment, which will lead to execution failure. Therefore, please do so with caution.
SecretKEY: they can be obtained from the COS API key management page. Enter the COS Console and select Key Management > TencentCloud API Key.
SecretKEY, they can be used directly; otherwise, you can click Create Key to generate a new pair of them.
Currently, you cannot specify a bootstrap action during scaling in the console. The bootstrap action specified during cluster creation will be executed during scaling.
If you want to specify a bootstrap action for scaling, use APIs to scale. If a bootstrap action is specified for scaling, it will be executed during scaling; otherwise, the one specified during cluster creation will be executed.
Logs and script files to be executed are stored in the
/usr/local/service/scripts/ directory. The script system log is
- The scripts will be executed on all types of nodes, and the script files and output log files of script execution will be stored on each node.
- Bootstrap script content needs to be encoded in UTF-8.