Hadoop Cluster Setup
Hadoop Cluster Setup
Agenda
Modify your hosts file SSH from master to all slaves SSH to all slaves to master Edit masters file Edit slaves file Modify hadoop-env.sh file Modify core-site.xml file Modify hdfs-site.xml file Modify mapred-site.xml file Formatting of name node Start Hadoop cluster Stop Hadoop cluster
sudo vi /etc/hosts
export JAVA_HOME=/usr export HADOOP_HOME=/home/neeraj/local_cluster_home/hadoop-1.0.3 Make these changes on each machine on cluster (master/slaves)
<configuration> <property> <name>fs.default.name</name> <value>hdfs://master:9000</value> </property> <property> <name>hadoop.tmp.dir</name> <value>/home/neeraj/local_cluster_home/hadoop1.0.3/hdfs_temp</value> </property> </configuration> Make these changes on each machine on cluster (master/slaves)
<configuration> <property> <name>mapred.job.tracker</name> <value>master:9001</value> <description>The host and port on MapReduce job tracker runs at. </description> </property>
Run the following command on master machine ./start-all.sh No need to start anything on slave machines
Run the following command on master machine ./stop-all.sh No need to stop anything on slave machines
Thanks