--Stop, Start and Restart Datanode
sudo service hadoop-hdfs-datanode stop
sudo service hadoop-hdfs-datanode start
sudo service hadoop-hdfs-datanode restart
--Stop, Start and Restart Node Manager
sudo service hadoop-yarn-nodemanager stop
sudo service hadoop-yarn-nodemanager start
sudo service hadoop-yarn-nodemanager restart
--Stop, Start and Restart Resource Manager
sudo service hadoop-yarn-resourcemanager stop
sudo service hadoop-yarn-resourcemanager start
sudo service hadoop-yarn-resourcemanager restart
--Restart all HDFS services on a node
for x in 'cd /etc/init.d ; ls hadoop-hdfs*' ; do sudo service $x restart ; done
--Restart all YARN services on a node
for x in 'cd /etc/init.d ; ls hadoop-yarn*' ; do sudo service $x restart ; done
--Restart all Hadoop services on a node
for x in `cd /etc/init.d ; ls hadoop-*` ; do sudo service $x restart ; done
--Start checkpointing operation
hdfs dfsadmin -safemode enter
hdfs dfsadmin -saveNamespace
--Save backup of FSIMAGE
hdfs dfsadmin -fetchImage /tmp/fsimage-bkup
--Start/Stop commands for HDP (Hortonworks Data Platform)
/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh start namenode
/usr/hdp/current/hadoop-hdfs-datanode/../hadoop/sbin/hadoop-daemon.sh start datanode
/usr/hdp/current/hadoop-yarn-resourcemanager/sbin/yarn-daemon.sh start resourcemanager
/usr/hdp/current/hadoop-yarn-resourcemanager/sbin/yarn-daemon.sh start nodemanager