问题
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...
回答1:
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
回答2:
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
来源:https://stackoverflow.com/questions/46709560/how-to-restart-spark-service-in-emr-after-changing-conf-settings