I'm working on this version of Hadoop: 2.6.0 on CDH 5.13.1
I've set some hadoop conf OPTS in mapred-sites.xml (java heap, mapred memory, ..). How can I restart hadoop services in one command ? In some posts, I found hadoop-daemon.sh but I cannot find equivalent on my platform.
Thanks for help !
You can do one thing. Prepared a shell script includes all the command for starting nodes and manager then give the executable permission and just run that sh file for starting all the services.
The below file is the example of my sh file.
start-all-master.sh
#!/bin/bash
# Zookeeper start
su - zookeeper -c "export ZOOCFGDIR=/usr/current/zookeeper-server/conf ; export ZOOCFG=zoo.cfg; source /usr/current/zookeeper-server/conf/zookeeper-env.sh ; /usr/current/zookeeper-server/bin/zkServer.sh start"
# HDFS start
su -l hdfs -c "/usr/current/hadoop-hdfs-journalnode/../hadoop/sbin/hadoop-daemon.sh start journalnode"
su -l hdfs -c "/usr/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh start namenode"
su -l hdfs -c "/usr/current/hadoop-hdfs-secondarynamenode/../hadoop/sbin/hadoop-daemon.sh start secondarynamenode"
su -l hdfs -c "/usr/current/hadoop-hdfs-datanode/../hadoop/sbin/hadoop-daemon.sh start datanode"
# YARN start
su -l yarn -c "/usr/current/hadoop-yarn-resourcemanager/sbin/yarn-daemon.sh start resourcemanager"
su -l yarn -c "/usr/current/hadoop-yarn-nodemanager/sbin/yarn-daemon.sh start nodemanager"