Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Hadoop2.x deploys namenode and SecondaryNameNode separately

Shulou Source: shulou.com Published: 2022-06-03 05:15:23 11月24日 Update

Modification method

Modify the hadoop2.7.7 directory on the hadoop namenode node

Cd ~ / hadoop-2.7.7/etc/hadoop/

Configuration

[hadoop@namenodeyw hadoop] $cat masters

Datenodeyw1 # indicates that the SecondaryNameNode service will be started on this node

[hadoop@namenodeyw hadoop] $cat hdfs-site.xml dfs.http.address namenodeyw:50070 The address and the base port where the dfs namenode web ui will listen on. If the port is 0 then the server will start on a free port. Dfs.namenode.secondary.http-address datanodeyw1:50090 dfs.name.dir / opt/hadoop/dfs/name Path on the local filesystem where theNameNode stores the namespace and transactions logs persistently. Dfs.data.dir / opt/hadoop/dfs/data Comma separated list of paths on the localfilesystem of a DataNode where it should store its blocks. Dfs.replication 3 dfs.permissions false need not permissions

[hadoop@namenodeyw hadoop] $cat core-site.xml

Hadoop.tmp.dir / opt/hadoop/tmp Abase for other temporary directories. Fs.default.name hdfs://namenodeyw:9000 fs.checkpoint.period 3600 The number of seconds between two periodic checkpoints. Fs.checkpoint.size 67108864

Then synchronize the changed configuration file directory to other nodes.

Restart the service in turn.

Restart the hadoop machine first. / start-all.sh

Restart zookeeper. / zkSever.sh start

Then start habase. / start-hbase.sh on the configuration hbase master node

Start on namenode

Screenshot of the process after start-all.sh startup

[hadoop@namenodeyw sbin] $jps

8017 NodeManager

8389 Jps

7498 NameNode

7642 DataNode

7900 ResourceManager

[hadoop@datanodeyw1 hadoop] $jps

16529 DataNode

16305 Main

16770 NodeManager

17238 Jps

16639 SecondaryNameNode

[hadoop@datanodeyw2 bin] $jps

13139 DataNode

13400 Jps

13257 NodeManager

The prompt to start start-yarn.sh on namenode has been started.

[hadoop@namenodeyw sbin] $. / start-yarn.sh

Starting yarn daemons

Resourcemanager running as process 7900. Stop it first.

Namenodeyw: nodemanager running as process 8017. Stop it first.

Datanodeyw2: nodemanager running as process 13257. Stop it first.

Datanodeyw1: nodemanager running as process 16770. Stop it first.

Tags: Node configuration directory service screenshot file method machine process synchronization prompt Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple vpn Linux Huawei OPPO Reno