After I make a configuration change, I need to restart an Amazon EMR service (for example, YARN Resource Manager), but I'm not sure how to do this. How can I restart an EMR service?

After a cluster has been launched, you might want to make changes to a service configuration. For example, you might want to change the replication factor for HDFS or scheduler settings for the YARN Resource Manager. After the configuration files are modified, the service must be restarted to pick up the changes.

EMR 2.x/3.x

On 2.x.x/3.x.x AMI clusters, all the service daemons are running as part of SysV init system via init.d scripts.

In order to restart a service in EMR, perform the following actions:

1.    Find the name of the service by running the following command:

$ ls /etc/init.d/

For example, the HDFS namenode service is named “hadoop-hdfs-namenode”.

2.    Stop the service by running the following command:

sudo /etc/init.d/hadoop-hdfs-namenode stop

3.    Wait a few seconds, and then start the service by running the following command:

sudo /etc/init.d/hadoop-hdfs-namenode start

4.    Verify that the process is running by running the following command:

sudo /etc/init.d/hadoop-hdfs-namenode status

EMR 4.x/5.x

EMR 4.x and 5x services have been added to Upstart.

In order to restart a service in EMR, perform the following actions:

1.    Find the name of the service by running the following command:

initctl list

For example, the YARN Resource Manager service is named “hadoop-yarn-resourcemanager”.

2.    Stop the service by running the following command:

sudo stop hadoop-yarn-resourcemanager

3.    Wait a few seconds, and then start the service by running the following command:

sudo start hadoop-yarn-resourcemanager

Note: Stop/start is required; do not use the restart command.

4.    Verify that the process is running by running the following command:

sudo status hadoop-yarn-resourcemanager

Check for the process using ps, and then check the log file for any errors in the log directory /var/log/.


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2016-12-29

Updated: 2017-08-02