In some circumstances, you need to start or stop a datanode without touching other nodes or whole hadoop cluster, how to do it?
Here is it
You can stop the DataNodes and TaskTrackers from NameNode's hadoop bin directory. If you have hadoop environment variables setup, then just run:
$ hadoop-daemon.sh stop tasktracker $ hadoop-daemon.sh stop datanode
So this script checks for slaves file in conf directory of hadoop to stop the DataNodes and same with the TaskTracker.
Again this script checks for slaves file in conf directory of hadoop to start the DataNodes and TaskTrackers.
$ hadoop-daemon.sh start tasktracker $ hadoop-daemon.sh start datanode