moorara
moorara

Reputation: 4226

Should we change the master and slaves config file for a Hadoop cluster in all nodes?

I know that we should put the IP address of the master node in conf/master file and put the IP addresses of all slave nodes in conf/slaves file one per each single line. My question is should we do this only on the master node or we should also change these two files on all slave nodes as well? Furthermore, If I want the master node to be as a DataNode and TaskTracker as well, should I put the IP address of master in slaves file as well?

Upvotes: 2

Views: 1158

Answers (1)

SachinJose
SachinJose

Reputation: 8522

conf/slaves, conf/master configuration files should be maintained only on master nodes not in slave nodes .conf/masters files is used for specifying the secondarynamenode host. start-all.sh consists of start-mapred.sh and start-dfs.sh. If you want to start Job tracker on a node then start-mapred.sh script should be executed on that node and based on it's conf/slaves files all Tasktracker services will be started on mentioned nodes.

Similarly start-dfs.sh script should be executed in Namenode machine, based on the values of conf/masters and conf/slaves, secondarynamenode and Datanodes will be started on the corresponding nodes respectively.

Upvotes: 2

Related Questions