Stopping Hadoop YARN Services
When you need to shut down the Hadoop YARN services, you can follow these steps to gracefully stop the YARN components.
Stopping YARN Services
- Stop the YARN Node Managers:
sudo /usr/local/hadoop/sbin/stop-yarn.sh
This command will stop all the Node Manager daemons running on the cluster nodes.
- Stop the YARN Resource Manager:
sudo /usr/local/hadoop/bin/yarn rmadmin -shutdownRM
This command will gracefully shut down the Resource Manager daemon.
Stopping HDFS Services
After stopping the YARN services, you can also stop the HDFS services (NameNode and DataNode) if needed:
sudo /usr/local/hadoop/sbin/stop-dfs.sh
This command will stop the HDFS daemons running on the cluster.
Verifying the Shutdown
You can verify the shutdown of the YARN and HDFS services by checking the process status:
sudo jps
This command will list all the Java processes running on the system. You should not see any Hadoop-related processes after stopping the services.
By following these steps, you can successfully stop the Hadoop YARN services and, if necessary, the HDFS services as well. This can be useful when you need to perform maintenance, upgrade the cluster, or shut down the system for any reason.