11

I am using EMR-5.9.0 and after changing some configuration files I want to restart the service to see the effect. How can I achieve this?

I tried to find the name of the service using initctl list, as I saw in other answers but no luck...

Dimitris Poulopoulos
  • 1,139
  • 2
  • 15
  • 36

2 Answers2

17

Since Spark runs as an application on Hadoop Yarn you can try

 sudo stop hadoop-yarn-resourcemanager  
 sudo start hadoop-yarn-resourcemanager  

If you meant the Spark History Server then you can use

 sudo stop spark-history-server  
 sudo start spark-history-server  

Checking the status of the services can be done using

sudo status hadoop-yarn-resourcemanager
sudo status spark-history-server

EDIT:
As hadooper suggested, for more recent versions of EMR use

sudo systemctl stop/start/status hadoop-yarn-resourcemanager
J00MZ
  • 675
  • 1
  • 10
  • 27
0

In the 5.x EMR clusters you can also do:

[hadoop@ip-10-0-2-93 conf]$ initctl list | grep yarn
hadoop-yarn-timelineserver start/running, process 10632
hadoop-yarn-resourcemanager start/running, process 10771
hadoop-yarn-proxyserver start/running, process 10508

[hadoop@ip-10-0-2-93 conf]$ sudo stop hadoop-yarn-resourcemanager
hadoop-yarn-resourcemanager stop/waiting

[hadoop@ip-10-0-2-93 conf]$ sudo start hadoop-yarn-resourcemanager
hadoop-yarn-resourcemanager start/running, process 1591

[hadoop@ip-10-0-2-93 conf]$ initctl list | grep yarn
hadoop-yarn-timelineserver start/running, process 10632
hadoop-yarn-resourcemanager start/running, process 1591
hadoop-yarn-proxyserver start/running, process 10508
Joarder Kamal
  • 1,387
  • 1
  • 20
  • 28