Popular Posts

Hadoop MultiNode Configuration

     Hadoop is a framework written in Java for running applications on large clusters of commodity hardware and incorporates features similar to those of the Google File System (GFS) and of the MapReduce computing paradigm. Hadoop’s HDFS is a highly fault-tolerant distributed file system and, like Hadoop in general, designed to be deployed on low-cost hardware. It provides high throughput access.

In this procedure i am using 
  • Ubuntu 14.04
  • Hadoop 1.2.1
STEP 1
 First you need to configure the single node .To configure Hadoop single node just follow the below link
Single Node Configuration

STEP 2

In multi-node we need more than one system.One system act as Master(in this procedure bimal is Master) and more than one slave systems.When the number of system increases the efficiency also increases .

Now we are getting into Multi-Node configuration of Hadoop.First we need to edit a file in /etc/hosts by using the following command.
  • bimal@bimal:~$ sudo gedit /etc/hosts


In multi-node we have more than one systems.Then you need to add their IP address and name of the systems to the file /etc/hosts.
Dynamic and Static IP address are possible to use but Static IP address is prferable.

SSH ACCESS (Only for Master)

Then you need to copy the masters system public key to all slave systems .Run the following command as hduser.

  • hduser@bimal:~$ ssh-copy-id -i $HOME/.ssh/id_rsa.pub hduser@thomas-hp-pavilion-g6-notebook-pc
If you have more than one slave systems then you should  copy the masters public key to each of the slave systems, by using the above command.

So connecting master to master(bimal).

  • hduser@bimal:~$ ssh bimal
So connecting Master to Slave(thomas-hp-pavilion-g6-notebook-pc).
  • hduser@bimal:~$ ssh thomas-hp-pavilion-g6-notebook-pc
EDIT .xml files(For both Master and Slaves)

    Change directory to /usr/local/hadoop/conf/


  • hduser@bimal:/usr/local/hadoop/conf$ cd /usr/local/hadoop/conf/
  • hduser@bimal:/usr/local/hadoop/conf$ sudo gedit core-site.xml
Then change the localhost to masters name
Edit core-site.xml

Edit mapred-site.xml

  • hduser@bimal:/usr/local/hadoop/conf$ sudo gedit mapred-site.xml


Edit hdfs-site.xml

  • hduser@bimal:/usr/local/hadoop/conf$ sudo gedit hdfs-site.xml
According to the number of systems and replication you can change the value.


Edit masters and slaves file(Both Master and Slaves)


Edit masters file

  • hduser@bimal:/usr/local/hadoop/conf$ sudo gedit masters
Both master and slaves must edit the file conf/masters and add your master name to the file.


Edit slaves file

  •  hduser@bimal:/usr/local/hadoop/conf$ sudo gedit slaves
Both master and slave must edit slaves file and add all slaves host name to the slaves file


Formatting the HDFS file system using namenode

By using the following command to format the HDFS file system.

  • hduser@bimal:/usr/local/hadoop/bin$ hadoop namenode -format
After formating the file system we start the cluster using the below command
  •  hduser@bimal:/usr/local/hadoop/bin$ start-dfs.sh
After executing the above command execute the following command
  • hduser@bimal:/usr/local/hadoop/bin$ start-mapred.sh
  • hduser@bimal:/usr/local/hadoop/bin$ jps


 Some times DataNode may not started then you need to clear /app/hadoop/tmp/
  • hduser@bimal:/usr/local/hadoop/bin$ rm -r /app/hadoop/tmp/*
Then re-format the HDFS file system before reformatting you need to stop all nodes.
  • hduser@bimal:/usr/local/hadoop/bin$ stop-all.sh
  • hduser@bimal:/usr/local/hadoop/bin$ hadoop namenode -format
  • Then start nodes using the above commands
Reference







7 comments:

  1. I get a lot of great information from this blog. Thank you for your sharing this informative blog. Just now I have completed hadoop certification course at a leading academy. If you are interested to learn Hadoop Training in Chennai visit FITA IT training and placement academy.

    ReplyDelete
  2. I am glad that I saw this post. It is informative blog for us and we need this type of blog thanks for share this blog, Keep posting such instructional blogs and I am looking forward for your future posts.
    angular js training in chennai

    angular js training in tambaram

    full stack training in chennai

    full stack training in tambaram

    php training in chennai

    php training in tambaram

    photoshop training in chennai

    photoshop training in tambaram

    ReplyDelete
  3. I am glad that I saw this post. It is informative blog for us and we need this type of blog thanks for share this blog, Keep posting such instructional blogs and I am looking forward for your future posts.
    data science training in chennai

    data science training in omr

    android training in chennai

    android training in omr

    devops training in chennai

    devops training in omr

    artificial intelligence training in chennai

    artificial intelligence training in omr

    ReplyDelete
  4. Are you looking for the best Azure training in Chennai here is the best suggestion for you, Infycle Technologies the best Software training institute to study to also other technical courses like Cyber Security, Graphic Design and Animation, Block Security, Java, Cyber Security, Oracle, Python, Big data, Azure, Python, Manual and Automation Testing, DevOps, Medical Coding etc., with technical trainers with amazing training with a peaceful environment. And we also provide 100+ Live Practical Sessions and Real-Time scenarios which helps you to easily get through the interviews in top MNC’s. for more queries approach us on 7504633633, 7502633633

    ReplyDelete