Where are the start/stop hadoop hdfs/mapred script

2019-07-20 02:10发布

问题:

The documentation for CDH4 refers to the /etc/init.d/hadoop-* scripts, but these no longer exist in CDH5.

I have waded into the documentation but was not successful in finding/understanding what is the CDH5 equivalent. Closest I could find was for the SCM manager:

http://www.cloudera.com/content/cloudera-content/cloudera-docs/CM5/latest/Cloudera-Manager-Administration-Guide/cm5ag_agents.html

Pointers to and explanation of the new process(/es) would be appreciated.

回答1:

I received a response on the Cloudera users' mailing list from Harsh:

They are still in the same location, but only installed if you followed the non-CM guide. CM relies on its own scripts.

I am following up with Harsh to determine how to retrofit the current installation to include those scripts.

UPDATE Further discussion on the mailing list:

From Jarek:

Don't be deceived by the fact that we are not using "master" branches - you have to check out release specific branches. For example slightly more then one moth old 5.0.1 sources are available in branch:

https://github.com/cloudera/hadoop-common/tree/cdh5-2.3.0_5.0.1

Based on the pointer from Jark, the following did the trick:

git clone -b  cdh5-2.3.0_5.0.1 https://github.com/cloudera/hadoop-common.git

Let us take a look at the results:

hadoop-common $git status

On branch cdh5-2.3.0_5.0.1
Your branch is up-to-date with 'origin/cdh5-2.3.0_5.0.1'.

And looks like the scripts I was seeking are there for the taking:

07:41:00/hadoop-common $find . -name st\*.sh

./hadoop-common-project/hadoop-common/src/main/bin/start-all.sh
./hadoop-common-project/hadoop-common/src/main/bin/stop-all.sh
./hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-balancer.sh
./hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-dfs.sh
./hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-secure-dns.sh
./hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-balancer.sh
./hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-dfs.sh
./hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-secure-dns.sh
./hadoop-mapreduce1-project/bin/start-mapred.sh
./hadoop-mapreduce1-project/bin/stop-mapred.sh
./hadoop-mapreduce1-project/src/contrib/thriftfs/scripts/start_thrift_server.sh
./hadoop-yarn-project/hadoop-yarn/bin/start-yarn.sh
./hadoop-yarn-project/hadoop-yarn/bin/stop-yarn.sh

That's what I was looking for.