如何在hadoop中启动所有守护进程 - 比如linux中的start-all.sh

时间:2014-01-28 18:25:26

标签: linux windows bash hadoop

我刚刚开始在Windows 7中使用hadoop,cygwin。我需要知道,这是有任何方法可以使用linux中的命令like-all-all.sh启动所有服务。我在cygwin中使用此命令不起作用。如果可能的话,请建议我使用cygwin在windows 7中使用hadoop进行任何工作。

每次我需要执行以下步骤来启动五个守护进程,如

Start the namenode in the first window by executing
cd hadoop
bin/hadoop namenode

Start the secondary namenode in the second window by executing
cd hadoop
bin/hadoop secondarynamenode

Start the job tracker the third window by executing
cd hadoop
bin/haoop jobtracker

Start the data node the fourth window by executing
cd hadoop
bin/haoop datanode

Start the task tracker the fifth window by executing
cd hadoop
bin/haoop tasktracker

请任何身体帮助

1 个答案:

答案 0 :(得分:0)

更改for条件以匹配Hadoop守护程序的路径:

 #!/bin/bash
 for service in /etc/init.d/hadoop-hdfs-* /etc/init.d/hadoop-0.20-mapreduce-*
 do
   sudo $service start
 done