Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to build the cluster environment of Hadoop

Shulou Source: shulou.com Published: 2022-05-31 19:08:03 09月21日 Update

This article mainly explains "how to build the cluster environment of Hadoop". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to build the cluster environment of Hadoop.

First, modify the core-site.xml file of Master. The contents of the file are as follows:

We changed the "localhost" domain name to "Master":

The same operation opens the Slave1 and Slave2 nodes core-site.xml, respectively, and changes the "localhost" domain name to "Master".

Secondly, modify the mapred-site.xml files of Master, Slave1 and Slave2.

Enter the mapred-site.xml file of the Master node to change the "localhost" domain name to "Master" and save and exit.

Similarly, open the Slave1 and Slave2 node mapred-site.xml, change the "localhost" domain name to "Master", and save and exit.

Finally, modify the hdfs-site.xml files of Master, Slave1 and Slave2:

We changed the "dfs.replication" value on the three machines from 1 to 3, so that we would have three copies of our data:

Save exit.

Step 4: modify the masters and slaves files of the hadoop configuration files on both machines

First modify the masters file of Master:

Access to the file:

Change "localhost" to "Master":

Save exit.

Modify the slaves file of Master

Enter the file:

The specific modifications are as follows:

Save exit.

From the above configuration, we can see that we use Master as both the master node and the data processing node, which is due to the consideration of 3 copies of our data and our limited number of machines.

Copy the masters and slaves files of the Master configuration to the conf folder under the Hadoop installation directory of Slave1 and Slave2, respectively:

Go to the Slave1 or Slave2 node to check the contents of the masters and slaves files:

It was found that the copy was completely correct.

At this point, the cluster environment of Hadoop is finally configured!

At this point, I believe you have a deeper understanding of "how to build the cluster environment of Hadoop". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: File node environment cluster content domain name configuration data machine copy copy learning utility deeper interest number of units practicality practical simple operation data processing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia MySQL Linux Shulou Information