tencent cloud

Elastic MapReduce

Release Notes and Announcements
Release Notes
Announcements
Security Announcements
Product Introduction
Overview
Strengths
Architecture
Features
Use Cases
Constraints and Limits
Technical Support Scope
Product release
Purchase Guide
EMR on CVM Billing Instructions
EMR on TKE Billing Instructions
EMR Serverless HBase Billing Instructions
Getting Started
EMR on CVM Quick Start
EMR on TKE Quick Start
EMR on CVM Operation Guide
Planning Cluster
Administrative rights
Configuring Cluster
Managing Cluster
Managing Service
Monitoring and Alarms
TCInsight
EMR on TKE Operation Guide
Introduction to EMR on TKE
Configuring Cluster
Cluster Management
Service Management
Monitoring and Ops
Application Analysis
EMR Serverless HBase Operation Guide
EMR Serverless HBase Product Introduction
Quotas and Limits
Planning an Instance
Managing an Instance
Monitoring and Alarms
Development Guide
EMR Development Guide
Hadoop Development Guide
Spark Development Guide
Hbase Development Guide
Phoenix on Hbase Development Guide
Hive Development Guide
Presto Development Guide
Sqoop Development Guide
Hue Development Guide
Oozie Development Guide
Flume Development Guide
Kerberos Development Guide
Knox Development Guide
Alluxio Development Guide
Kylin Development Guide
Livy Development Guide
Kyuubi Development Guide
Zeppelin Development Guide
Hudi Development Guide
Superset Development Guide
Impala Development Guide
Druid Development Guide
TensorFlow Development Guide
Kudu Development Guide
Ranger Development Guide
Kafka Development Guide
Iceberg Development Guide
StarRocks Development Guide
Flink Development Guide
JupyterLab Development Guide
MLflow Development Guide
Practical Tutorial
Practice of EMR on CVM Ops
Data Migration
Practical Tutorial on Custom Scaling
API Documentation
History
Introduction
API Category
Cluster Resource Management APIs
Cluster Services APIs
User Management APIs
Data Inquiry APIs
Scaling APIs
Configuration APIs
Other APIs
Serverless HBase APIs
YARN Resource Scheduling APIs
Making API Requests
Data Types
Error Codes
FAQs
EMR on CVM
Service Level Agreement
Contact Us

Bootstrap Actions

PDF
Focus Mode
Font Size
Last updated: 2023-12-27 10:02:08

Overview

A bootstrap action involves executing custom scripts during cluster creation so that you can modify the cluster environment, install third-party software, and utilize proprietary data. This action runs the bootstrap script during cluster creation (including cluster scale-out) and cluster termination (including cluster scale-in), except for router nodes. Currently, you can specify a bootstrap action only for cluster creation and termination in the console. You can also specify a bootstrap action for the scale-out or scale-in process via API. By default, if no bootstrap action is specified via API, the bootstrap action specified for cluster creation is executed during the scale-out process, and the bootstrap action specified for cluster termination is executed during the scale-in process.
1. The bootstrap action specified for cluster creation (including cluster scale-out) can be executed in any of the following circumstances: a. After server initialization: After server resource initialization and before EMR cluster software installation. b. Before cluster start: Before cluster service start. c. After cluster start: After cluster service start.
2. The bootstrap action specified for cluster termination (including cluster scale-in) can be executed in the following circumstance: a. Before service deactivation: Before cluster service deactivation. Bootstrap actions run scripts during cluster creation and scale-out in the order in which the scripts are added. The number of bootstrap actions cannot exceed 16.
Note:
We recommend that you create a small pay-as-you-go cluster first to test whether the bootstrap action works properly, and if yes, create a cluster for actual business.

Directions

Option 1: Add a bootstrap action when creating a cluster on the purchase page
1. Choose Basic Configuration > Advanced Settings > Add Bootstrap Action to add a bootstrap action.


2. Edit or delete the added bootstrap action as needed.


Select a time for running the script and enter relevant parameters.
Name: We recommend you enter your object name.
Script Location: We recommend you copy the location information from the COS details page. Go to the COS console, click Bucket List, select the target script, and choose Operation > Details. On the Details page, you can see the object name and object address.
Parameter: This refers to the parameters for running the script. Separate multiple parameters by spaces, and do not add spaces in individual parameters. The total length of Parameter and Name cannot exceed 240 characters.
Option 2: Add a bootstrap action on the Basic information page of the cluster
1. Log in to the EMR console and click the ID/Name of the target cluster in the cluster list to enter the cluster details page. Then, choose Basic information > Bootstrap Actions and click Add Bootstrap Action.
2. Edit or delete the added bootstrap action as needed. Select a time for running the script and enter relevant parameters.
Name: We recommend you enter your object name.
Script Location: We recommend you copy the location information from the COS details page. Go to the COS console, click Bucket List, select the target script, and choose Operation > Details.
Parameter: This refers to the parameters for running the script. Separate multiple parameters by spaces, and do not add spaces in individual parameters. The total length of Parameter and Name cannot exceed 240 characters.

Viewing Bootstrap Result

Currently, you can specify a bootstrap action for scale-out via API but not in the console. If a bootstrap action is specified, it will be executed during scale-out; otherwise, the one specified for cluster creation will be executed.
1. View the bootstrap result in the script's system log.
Logs and script files to be executed are stored in the /usr/local/service/scripts/ directory. The script system log is script_syslog. Naming convention 1: "Execution order" + "" + "Time" + "Script name" + "" + stderr.
Naming convention 2: "Execution order" + "" + "Time" + "Script name" + "" + stdout.
Note:
The scripts will be executed on all types of nodes, and the script files and log files output by script execution will be stored on each node.
Bootstrap scripts need to be encoded in UTF-8.
2. View the bootstrap result in the Task Center. Log in to the EMR console, click Task Center on the left sidebar, or enter a cluster, click Task in the top-right corner, and select the target process (creating cluster, scaling out cluster, or initializing node). Then, you can click Run Details in the service initialization step of Task details to view the bootstrap result.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback