Get the App
SLTechnology News&Howtos  ›  Servers  › 

Hadoop 2.7.1 how to add nodes dynamically

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

This article mainly introduces hadoop 2.7.1 how to dynamically add nodes, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Add nodes dynamically

Hftest0001 (master node)

[hadoop@hftest0001 hadoop] $pwd/home/hadoop/hadoop-2.7.1/etc/hadoop [hadoop@hftest0001 hadoop] $cat masters hftest0001.webex.com [hadoop@hftest0001 hadoop] $cat slaves hftest0002.webex.com [hadoop@hftest0001 hadoop] $cat hdfs-site.xml dfs.replication 1.

Hftest0002 (data node)

[hadoop@hftest0002 hadoop] $pwd/home/hadoop/hadoop-2.7.1/etc/hadoop [hadoop@hftest0002 hadoop] $cat masters hftest0001.webex.com [hadoop@hftest0002 hadoop] $cat slaves hftest0002.webex.com [hadoop@hftest0002 hadoop] $cat hdfs-site.xml dfs.replication 1. [hadoop@hftest0001 hadoop-2.7.1] $. / bin/hdfs dfs- ls / tmpFound 1 items-rw-r--r-- 1 hadoop supergroup 1366 2016-01-28 13:48 / tmp/README.txt = > replication 1

Prepare:

Create a new node hftest0003

Modify hostname (/ etc/sysconf/network) and hosts (/ etc/hosts) to make clusters ping each other

Modify the slaves file to add a new node

Modify replication= > 2

[hadoop@hftest0001 hadoop] $pwd/home/hadoop/hadoop-2.7.1/etc/hadoop [hadoop@hftest0003 hadoop] $cat masters hftest0001.webex.com [hadoop@hftest0003 hadoop] $cat slaves hftest0002.webex.comhftest0003.webex.com [hadoop@hftest0003 hadoop] $cat hdfs-site.xml dfs.replication 2.

Note: all clusters need to be modified

[hadoop@hftest0001 hadoop-2.7.1] $pwd/home/hadoop/hadoop-2.7.1 launch datanode [Hadoop @ hftest0001 hadoop-2.7.1] $. / sbin/hadoop-daemon.sh start datanode.webui can verify [hadoop@hftest0001 hadoop-2.7.1] $. / sbin/start-balancer.sh-threshold 5 launch nodemanager [Hadoop @ hftest0001 hadoop-2.7.1] $. / sbin/yarn-daemon.sh start nodemanager.... .. [hadoop@hftest0001 hadoop-2.7.1] $. / bin/hdfs dfs-ls / tmpFound 2 items-rw-r--r-- 2 hadoop supergroup 101 2016-01-28 13:54 / tmp/NOTICE.txt = = > replication=2-rw-r--r-- 1 hadoop supergroup 1366 2016-01-28 13:48 / tmp/README.txt Thank you for reading this article carefully I hope the article "how to add nodes dynamically in hadoop 2.7.1" shared by the editor is helpful to everyone. At the same time, I also hope that you can support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Nodes articles dynamic cluster value interest at the same time documents more friends knowledge editing industry information information channels channels preparation reference learning help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Huawei Xiaomi Apple macOS