博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Apache Hadoop 2.9.2 的集群管理之服役和退役
阅读量:6463 次
发布时间:2019-06-23

本文共 43246 字,大约阅读时间需要 144 分钟。

                Apache Hadoop 2.9.2 的集群管理之服役和退役

                                            作者:尹正杰

版权声明:原创作品,谢绝转载!否则将追究法律责任。

 

 

  随着公司业务的发展,客户量越来越多,产生的日志自然也就越来越大来,可能我们现有集群的DataNode节点的容量依旧不能满足存储数据的需求,因此需要在现有的集群基础之上动态添加DataNode在生成环境中也是很有可能的。

 

一.添加新节点的过程(服役)

1>.查看需要加入进群的节点的IP地址

[root@node110.yinzhengjie.org.cn ~]# ifconfig eth0: flags=4163
mtu 1500 inet 172.30.1.110 netmask 255.255.255.0 broadcast 172.30.1.255 inet6 fe80::21c:42ff:fe11:4014 prefixlen 64 scopeid 0x20
ether 00:1c:42:11:40:14 txqueuelen 1000 (Ethernet) RX packets 61 bytes 7872 (7.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 45 bytes 7540 (7.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo: flags=73
mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 0 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0[root@node110.yinzhengjie.org.cn ~]#
[root@node110.yinzhengjie.org.cn ~]# ifconfig
[root@node110.yinzhengjie.org.cn ~]# cat /etc/hosts | grep yinzhengjie172.30.1.101 node101.yinzhengjie.org.cn172.30.1.102 node102.yinzhengjie.org.cn172.30.1.103 node103.yinzhengjie.org.cn172.30.1.110 node110.yinzhengjie.org.cn[root@node110.yinzhengjie.org.cn ~]#
[root@node110.yinzhengjie.org.cn ~]# cat /etc/hosts | grep yinzhengjie
[root@node110.yinzhengjie.org.cn ~]# yum -y install java-1.8.0-openjdk-develLoaded plugins: fastestmirror, langpacksLoading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.comResolving Dependencies--> Running transaction check---> Package java-1.8.0-openjdk-devel.x86_64 1:1.8.0.201.b09-2.el7_6 will be installed--> Processing Dependency: java-1.8.0-openjdk(x86-64) = 1:1.8.0.201.b09-2.el7_6 for package: 1:java-1.8.0-openjdk-devel-1.8.0.201.b09-2.el7_6.x86_64--> Running transaction check---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.201.b09-2.el7_6 will be installed--> Processing Dependency: java-1.8.0-openjdk-headless(x86-64) = 1:1.8.0.201.b09-2.el7_6 for package: 1:java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64--> Running transaction check---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.201.b09-2.el7_6 will be installed--> Finished Dependency ResolutionDependencies Resolved========================================================================================================================================================================================================================================== Package                                                             Arch                                           Version                                                         Repository                                       Size==========================================================================================================================================================================================================================================Installing: java-1.8.0-openjdk-devel                                            x86_64                                         1:1.8.0.201.b09-2.el7_6                                         updates                                         9.8 MInstalling for dependencies: java-1.8.0-openjdk                                                  x86_64                                         1:1.8.0.201.b09-2.el7_6                                         updates                                         260 k java-1.8.0-openjdk-headless                                         x86_64                                         1:1.8.0.201.b09-2.el7_6                                         updates                                          32 MTransaction Summary==========================================================================================================================================================================================================================================Install  1 Package (+2 Dependent packages)Total download size: 42 MInstalled size: 144 MDownloading packages:(1/3): java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64.rpm                                                                                                                                                         | 260 kB  00:00:00     (2/3): java-1.8.0-openjdk-devel-1.8.0.201.b09-2.el7_6.x86_64.rpm                                                                                                                                                   | 9.8 MB  00:00:11     (3/3): java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el7_6.x86_64.rpm                                                                                                                                                |  32 MB  00:00:18     ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Total                                                                                                                                                                                                     2.3 MB/s |  42 MB  00:00:18     Running transaction checkRunning transaction testTransaction test succeededRunning transaction  Installing : 1:java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el7_6.x86_64                                                                                                                                                             1/3   Installing : 1:java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64                                                                                                                                                                      2/3   Installing : 1:java-1.8.0-openjdk-devel-1.8.0.201.b09-2.el7_6.x86_64                                                                                                                                                                3/3   Verifying  : 1:java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64                                                                                                                                                                      1/3   Verifying  : 1:java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el7_6.x86_64                                                                                                                                                             2/3   Verifying  : 1:java-1.8.0-openjdk-devel-1.8.0.201.b09-2.el7_6.x86_64                                                                                                                                                                3/3 Installed:  java-1.8.0-openjdk-devel.x86_64 1:1.8.0.201.b09-2.el7_6                                                                                                                                                                                 Dependency Installed:  java-1.8.0-openjdk.x86_64 1:1.8.0.201.b09-2.el7_6                                                               java-1.8.0-openjdk-headless.x86_64 1:1.8.0.201.b09-2.el7_6                                                              Complete![root@node110.yinzhengjie.org.cn ~]#
[root@node110.yinzhengjie.org.cn ~]# yum -y install java-1.8.0-openjdk-devel

2>.将NameNode节点配置环境拷贝到需要加入进群的节点的服务器

[root@node101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/hadoop-2.9.2/etc/hadoop/hdfs-site.xml 
dfs.namenode.checkpoint.period
3600
dfs.namenode.name.dir
file:///${hadoop.tmp.dir}/dfs/namenode1,file:///${hadoop.tmp.dir}/dfs/namenode2,file:///${hadoop.tmp.dir}/dfs/namenode3
dfs.datanode.data.dir
file:///${hadoop.tmp.dir}/dfs/data1,file:///${hadoop.tmp.dir}/dfs/data2
dfs.replication
2
dfs.namenode.heartbeat.recheck-interval
300000
dfs.heartbeat.interval
3
dfs.hosts.exclude
file:///${hadoop.tmp.dir}/dfs.hosts.exclude.txt
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/hadoop-2.9.2/etc/hadoop/hdfs-site.xml
[root@node101.yinzhengjie.org.cn ~]# ssh-copy-id node110.yinzhengjie.org.cn/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"The authenticity of host 'node110.yinzhengjie.org.cn (172.30.1.110)' can't be established.ECDSA key fingerprint is SHA256:7fUJXbFRvzvhON0FKnxvIivwkEZsiQ1jXE3V3i7ONEg.ECDSA key fingerprint is MD5:7b:34:fb:ed:80:13:ed:7b:83:db:24:56:75:68:0c:5b.Are you sure you want to continue connecting (yes/no)? yes/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keysroot@node110.yinzhengjie.org.cn's password: Number of key(s) added: 1Now try logging into the machine, with:   "ssh 'node110.yinzhengjie.org.cn'"and check to make sure that only the key(s) you wanted were added.[root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# ssh-copy-id node110.yinzhengjie.org.cn
[root@node101.yinzhengjie.org.cn ~]# scp -r /yinzhengjie/softwares/hadoop-2.9.2/ node110.yinzhengjie.org.cn:/yinzhengjie/softwares/.......README.txt                                                                                                                                                                                            100% 1366     2.8MB/s   00:00    mapred-config.cmd                                                                                                                                                                                     100% 1640     4.8MB/s   00:00    hdfs-config.sh                                                                                                                                                                                        100% 1427     3.9MB/s   00:00    httpfs-config.sh                                                                                                                                                                                      100% 7666    17.4MB/s   00:00    hdfs-config.cmd                                                                                                                                                                                       100% 1640     4.3MB/s   00:00    yarn-config.cmd                                                                                                                                                                                       100% 2131     6.0MB/s   00:00    mapred-config.sh                                                                                                                                                                                      100% 2223     5.6MB/s   00:00    hadoop-config.cmd                                                                                                                                                                                     100% 8484    16.3MB/s   00:00    hadoop-config.sh                                                                                                                                                                                      100%   11KB  17.3MB/s   00:00    yarn-config.sh                                                                                                                                                                                        100% 2134     5.4MB/s   00:00    kms-config.sh                                                                                                                                                                                         100% 7899    18.3MB/s   00:00    libhadooppipes.a                                                                                                                                                                                      100% 1594KB  85.3MB/s   00:00    libhadooputils.a                                                                                                                                                                                      100%  465KB  69.0MB/s   00:00    libhdfs.so.0.0.0                                                                                                                                                                                      100%  278KB  44.4MB/s   00:00    wordcount-part                                                                                                                                                                                        100%  933KB  93.5MB/s   00:00    wordcount-simple                                                                                                                                                                                      100%  924KB  49.3MB/s   00:00    pipes-sort                                                                                                                                                                                            100%  910KB  54.9MB/s   00:00    wordcount-nopipe                                                                                                                                                                                      100%  972KB  46.8MB/s   00:00    libhdfs.so                                                                                                                                                                                            100%  278KB  54.1MB/s   00:00    libhdfs.a                                                                                                                                                                                             100%  444KB  65.7MB/s   00:00    libhadoop.so                                                                                                                                                                                          100%  822KB  65.9MB/s   00:00    libhadoop.a                                                                                                                                                                                           100% 1406KB  65.3MB/s   00:00    libhadoop.so.1.0.0                                                                                                                                                                                    100%  822KB  85.6MB/s   00:00    [root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# scp -r /yinzhengjie/softwares/hadoop-2.9.2/ node110.yinzhengjie.org.cn:/yinzhengjie/softwares/
[root@node101.yinzhengjie.org.cn ~]# scp /etc/profile node110.yinzhengjie.org.cn:/etc/profile                                                                                                                                                                                               100% 1937     3.8MB/s   00:00    [root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# scp /etc/profile node110.yinzhengjie.org.cn:/etc/ profile

3>.在新加入的datanode节点上单独启动datanode进程 

[root@node110.yinzhengjie.org.cn ~]# hadoop-daemon.sh start datanodestarting datanode, logging to /yinzhengjie/softwares/hadoop-2.9.2/logs/hadoop-root-datanode-node110.yinzhengjie.org.cn.out[root@node110.yinzhengjie.org.cn ~]# [root@node110.yinzhengjie.org.cn ~]# jps4080 DataNode4167 Jps[root@node110.yinzhengjie.org.cn ~]#
[root@node110.yinzhengjie.org.cn ~]# hadoop-daemon.sh start datanode

4>.编辑黑名单,将node102.yinzhengjie.org.cn节点加入我们定义好的配置文件 

[root@node101.yinzhengjie.org.cn ~]# cat /data/hadoop/hdfs/dfs.hosts.exclude.txt node102.yinzhengjie.org.cn[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# cat /data/hadoop/hdfs/dfs.hosts.exclude.txt
[root@node101.yinzhengjie.org.cn ~]# hdfs dfsadmin -refreshNodesRefresh nodes successful[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# hdfs dfsadmin -refreshNodes            #如果有同时不存在文件的话可以重启一下集群!

5>.关于服役相关说明

   根据上述的步骤,我们可以成功将一个节点加入到集另一个群中。也可以禁用某个节点,只需要将该主机加入到我们自定义的黑名单配置文件中即可。其实我们将节点加入集群成功后,我们最好将slaves文件也修改为最新的状态,从而达到便于管理集群的DataNode的目的,不用每次启动集群时都新加入的集群需要单独启动! 

[root@node101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/hadoop-2.9.2/etc/hadoop/slaves node101.yinzhengjie.org.cnnode102.yinzhengjie.org.cnnode103.yinzhengjie.org.cnnode110.yinzhengjie.org.cn[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/hadoop-2.9.2/etc/hadoop/slaves

 

二.删除旧节点的过程(退役)

1>.修改NameNode的配置文件并同步到其他节点上去

[root@node101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/hadoop-2.9.2/etc/hadoop/hdfs-site.xml 
dfs.namenode.checkpoint.period
3600
dfs.namenode.name.dir
file:///${hadoop.tmp.dir}/dfs/namenode1,file:///${hadoop.tmp.dir}/dfs/namenode2,file:///${hadoop.tmp.dir}/dfs/namenode3
dfs.datanode.data.dir
file:///${hadoop.tmp.dir}/dfs/data1,file:///${hadoop.tmp.dir}/dfs/data2
dfs.replication
2
dfs.namenode.heartbeat.recheck-interval
300000
dfs.heartbeat.interval
3
dfs.hosts
/data/hadoop/hdfs/DataNodesHostname.txt
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/hadoop-2.9.2/etc/hadoop/hdfs-site.xml
[root@node101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/hadoop-2.9.2/etc/hadoop/slaves node101.yinzhengjie.org.cnnode102.yinzhengjie.org.cnnode103.yinzhengjie.org.cnnode110.yinzhengjie.org.cn[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/hadoop-2.9.2/etc/hadoop/slaves
[root@node101.yinzhengjie.org.cn ~]# stop-dfs.sh Stopping namenodes on [node101.yinzhengjie.org.cn]node101.yinzhengjie.org.cn: stopping namenodenode101.yinzhengjie.org.cn: stopping datanodenode102.yinzhengjie.org.cn: stopping datanodenode103.yinzhengjie.org.cn: stopping datanodenode110.yinzhengjie.org.cn: stopping datanodeStopping secondary namenodes [account.jetbrains.com]account.jetbrains.com: stopping secondarynamenode[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# stop-dfs.sh
[root@node101.yinzhengjie.org.cn ~]# scp -r /yinzhengjie/softwares/hadoop-2.9.2/ node102.yinzhengjie.org.cn:/yinzhengjie/softwares/........hadoop-yarn-server-applicationhistoryservice-2.9.2.jar                                                                                                                                                100%  528KB  45.6MB/s   00:00    mssql-jdbc-6.2.1.jre7.jar                                                                                                                                                                             100%  774KB  79.0MB/s   00:00    hadoop-streaming-2.9.2.jar                                                                                                                                                                            100%  132KB  49.4MB/s   00:00    commons-math3-3.1.1.jar                                                                                                                                                                               100% 1562KB  66.9MB/s   00:00    json-io-2.5.1.jar                                                                                                                                                                                     100%   73KB  60.5MB/s   00:00    ojalgo-43.0.jar                                                                                                                                                                                       100% 1625KB  74.2MB/s   00:00    hadoop-azure-datalake-2.9.2.jar                                                                                                                                                                       100%   52KB  51.3MB/s   00:00    README.txt                                                                                                                                                                                            100% 1366     3.0MB/s   00:00    mapred-config.cmd                                                                                                                                                                                     100% 1640     4.0MB/s   00:00    hdfs-config.sh                                                                                                                                                                                        100% 1427     4.0MB/s   00:00    httpfs-config.sh                                                                                                                                                                                      100% 7666    15.9MB/s   00:00    hdfs-config.cmd                                                                                                                                                                                       100% 1640     4.0MB/s   00:00    yarn-config.cmd                                                                                                                                                                                       100% 2131     6.2MB/s   00:00    mapred-config.sh                                                                                                                                                                                      100% 2223     5.9MB/s   00:00    hadoop-config.cmd                                                                                                                                                                                     100% 8484    17.1MB/s   00:00    hadoop-config.sh                                                                                                                                                                                      100%   11KB  17.5MB/s   00:00    yarn-config.sh                                                                                                                                                                                        100% 2134     5.1MB/s   00:00    kms-config.sh                                                                                                                                                                                         100% 7899    17.0MB/s   00:00    libhadooppipes.a                                                                                                                                                                                      100% 1594KB  96.4MB/s   00:00    libhadooputils.a                                                                                                                                                                                      100%  465KB  73.5MB/s   00:00    libhdfs.so.0.0.0                                                                                                                                                                                      100%  278KB  32.1MB/s   00:00    wordcount-part                                                                                                                                                                                        100%  933KB  80.2MB/s   00:00    wordcount-simple                                                                                                                                                                                      100%  924KB  81.8MB/s   00:00    pipes-sort                                                                                                                                                                                            100%  910KB  81.9MB/s   00:00    wordcount-nopipe                                                                                                                                                                                      100%  972KB  67.6MB/s   00:00    libhdfs.so                                                                                                                                                                                            100%  278KB  63.1MB/s   00:00    libhdfs.a                                                                                                                                                                                             100%  444KB  42.7MB/s   00:00    libhadoop.so                                                                                                                                                                                          100%  822KB  64.9MB/s   00:00    libhadoop.a                                                                                                                                                                                           100% 1406KB  71.3MB/s   00:00    libhadoop.so.1.0.0                                                                                                                                                                                    100%  822KB  71.9MB/s   00:00    [root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# scp -r /yinzhengjie/softwares/hadoop-2.9.2/ node102.yinzhengjie.org.cn:/yinzhengjie/softwares/
[root@node101.yinzhengjie.org.cn ~]# scp -r /yinzhengjie/softwares/hadoop-2.9.2/ node103.yinzhengjie.org.cn:/yinzhengjie/softwares/......hadoop-yarn-server-applicationhistoryservice-2.9.2.jar                                                                                                                                                100%  528KB  92.0MB/s   00:00    mssql-jdbc-6.2.1.jre7.jar                                                                                                                                                                             100%  774KB 101.6MB/s   00:00    hadoop-streaming-2.9.2.jar                                                                                                                                                                            100%  132KB  65.0MB/s   00:00    commons-math3-3.1.1.jar                                                                                                                                                                               100% 1562KB  78.3MB/s   00:00    json-io-2.5.1.jar                                                                                                                                                                                     100%   73KB  28.8MB/s   00:00    ojalgo-43.0.jar                                                                                                                                                                                       100% 1625KB 103.0MB/s   00:00    hadoop-azure-datalake-2.9.2.jar                                                                                                                                                                       100%   52KB  37.3MB/s   00:00    README.txt                                                                                                                                                                                            100% 1366     2.0MB/s   00:00    mapred-config.cmd                                                                                                                                                                                     100% 1640     3.6MB/s   00:00    hdfs-config.sh                                                                                                                                                                                        100% 1427     2.2MB/s   00:00    httpfs-config.sh                                                                                                                                                                                      100% 7666    10.0MB/s   00:00    hdfs-config.cmd                                                                                                                                                                                       100% 1640     2.8MB/s   00:00    yarn-config.cmd                                                                                                                                                                                       100% 2131     3.4MB/s   00:00    mapred-config.sh                                                                                                                                                                                      100% 2223     2.4MB/s   00:00    hadoop-config.cmd                                                                                                                                                                                     100% 8484    13.4MB/s   00:00    hadoop-config.sh                                                                                                                                                                                      100%   11KB  20.1MB/s   00:00    yarn-config.sh                                                                                                                                                                                        100% 2134     4.6MB/s   00:00    kms-config.sh                                                                                                                                                                                         100% 7899    13.5MB/s   00:00    libhadooppipes.a                                                                                                                                                                                      100% 1594KB  87.6MB/s   00:00    libhadooputils.a                                                                                                                                                                                      100%  465KB  72.3MB/s   00:00    libhdfs.so.0.0.0                                                                                                                                                                                      100%  278KB  65.6MB/s   00:00    wordcount-part                                                                                                                                                                                        100%  933KB  76.3MB/s   00:00    wordcount-simple                                                                                                                                                                                      100%  924KB  67.2MB/s   00:00    pipes-sort                                                                                                                                                                                            100%  910KB  91.2MB/s   00:00    wordcount-nopipe                                                                                                                                                                                      100%  972KB  95.2MB/s   00:00    libhdfs.so                                                                                                                                                                                            100%  278KB  79.6MB/s   00:00    libhdfs.a                                                                                                                                                                                             100%  444KB  85.3MB/s   00:00    libhadoop.so                                                                                                                                                                                          100%  822KB 100.9MB/s   00:00    libhadoop.a                                                                                                                                                                                           100% 1406KB  86.2MB/s   00:00    libhadoop.so.1.0.0                                                                                                                                                                                    100%  822KB  73.3MB/s   00:00    [root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# scp -r /yinzhengjie/softwares/hadoop-2.9.2/ node103.yinzhengjie.org.cn:/yinzhengjie/softwares/
[root@node101.yinzhengjie.org.cn ~]# scp -r /yinzhengjie/softwares/hadoop-2.9.2/ node110.yinzhengjie.org.cn:/yinzhengjie/softwares/.......mssql-jdbc-6.2.1.jre7.jar                                                                                                                                                                             100%  774KB  52.9MB/s   00:00    hadoop-streaming-2.9.2.jar                                                                                                                                                                            100%  132KB  48.1MB/s   00:00    commons-math3-3.1.1.jar                                                                                                                                                                               100% 1562KB  71.7MB/s   00:00    json-io-2.5.1.jar                                                                                                                                                                                     100%   73KB  37.7MB/s   00:00    ojalgo-43.0.jar                                                                                                                                                                                       100% 1625KB  57.2MB/s   00:00    hadoop-azure-datalake-2.9.2.jar                                                                                                                                                                       100%   52KB  26.5MB/s   00:00    README.txt                                                                                                                                                                                            100% 1366     1.5MB/s   00:00    mapred-config.cmd                                                                                                                                                                                     100% 1640     1.8MB/s   00:00    hdfs-config.sh                                                                                                                                                                                        100% 1427   805.6KB/s   00:00    httpfs-config.sh                                                                                                                                                                                      100% 7666     8.9MB/s   00:00    hdfs-config.cmd                                                                                                                                                                                       100% 1640     2.1MB/s   00:00    yarn-config.cmd                                                                                                                                                                                       100% 2131     2.3MB/s   00:00    mapred-config.sh                                                                                                                                                                                      100% 2223     3.0MB/s   00:00    hadoop-config.cmd                                                                                                                                                                                     100% 8484     9.9MB/s   00:00    hadoop-config.sh                                                                                                                                                                                      100%   11KB  26.7MB/s   00:00    yarn-config.sh                                                                                                                                                                                        100% 2134     2.7MB/s   00:00    kms-config.sh                                                                                                                                                                                         100% 7899     9.6MB/s   00:00    libhadooppipes.a                                                                                                                                                                                      100% 1594KB  79.1MB/s   00:00    libhadooputils.a                                                                                                                                                                                      100%  465KB  52.7MB/s   00:00    libhdfs.so.0.0.0                                                                                                                                                                                      100%  278KB  53.3MB/s   00:00    wordcount-part                                                                                                                                                                                        100%  933KB  74.5MB/s   00:00    wordcount-simple                                                                                                                                                                                      100%  924KB  74.3MB/s   00:00    pipes-sort                                                                                                                                                                                            100%  910KB  81.6MB/s   00:00    wordcount-nopipe                                                                                                                                                                                      100%  972KB  83.4MB/s   00:00    libhdfs.so                                                                                                                                                                                            100%  278KB  51.4MB/s   00:00    libhdfs.a                                                                                                                                                                                             100%  444KB  64.2MB/s   00:00    libhadoop.so                                                                                                                                                                                          100%  822KB  55.9MB/s   00:00    libhadoop.a                                                                                                                                                                                           100% 1406KB  77.2MB/s   00:00    libhadoop.so.1.0.0                                                                                                                                                                                    100%  822KB  78.3MB/s   00:00    [root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# scp -r /yinzhengjie/softwares/hadoop-2.9.2/ node110.yinzhengjie.org.cn:/yinzhengjie/softwares/

2>.编辑白名单 

[root@node101.yinzhengjie.org.cn ~]# cat /data/hadoop/hdfs/DataNodesHostname.txtnode101.yinzhengjie.org.cnnode103.yinzhengjie.org.cnnode110.yinzhengjie.org.cn[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# cat /data/hadoop/hdfs/DataNodesHostname.txt
[root@node101.yinzhengjie.org.cn ~]# start-dfs.sh Starting namenodes on [node101.yinzhengjie.org.cn]node101.yinzhengjie.org.cn: starting namenode, logging to /yinzhengjie/softwares/hadoop-2.9.2/logs/hadoop-root-namenode-node101.yinzhengjie.org.cn.outnode102.yinzhengjie.org.cn: starting datanode, logging to /yinzhengjie/softwares/hadoop-2.9.2/logs/hadoop-root-datanode-node102.yinzhengjie.org.cn.outnode101.yinzhengjie.org.cn: starting datanode, logging to /yinzhengjie/softwares/hadoop-2.9.2/logs/hadoop-root-datanode-node101.yinzhengjie.org.cn.outnode103.yinzhengjie.org.cn: starting datanode, logging to /yinzhengjie/softwares/hadoop-2.9.2/logs/hadoop-root-datanode-node103.yinzhengjie.org.cn.outnode110.yinzhengjie.org.cn: starting datanode, logging to /yinzhengjie/softwares/hadoop-2.9.2/logs/hadoop-root-datanode-node110.yinzhengjie.org.cn.outStarting secondary namenodes [account.jetbrains.com]account.jetbrains.com: starting secondarynamenode, logging to /yinzhengjie/softwares/hadoop-2.9.2/logs/hadoop-root-secondarynamenode-node101.yinzhengjie.org.cn.out[root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# jps13141 Jps12389 NameNode12553 DataNode12857 SecondaryNameNode[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# start-dfs.sh

 

3>.关于yarn的服役和退役

   配置的套路和上面配置DataNode的套路几乎一致!详情请参考:。

 

转载于:https://www.cnblogs.com/yinzhengjie/p/10693499.html

你可能感兴趣的文章
CF708A Letters Cyclic Shift 模拟
查看>>
Spring+MyBatis整合
查看>>
JAVA的起源和基础
查看>>
Android深度探索(卷1)HAL与驱动开发第六章总结
查看>>
lua序列化(支持循环引用)
查看>>
【转载】Java - Wait & Notify
查看>>
通过回调在fragment中获取activity的触摸事件
查看>>
安卓 内容提供者 sql 区别
查看>>
CSRF
查看>>
B-tree&B+tree
查看>>
jquery禁止点击事件,css禁止按钮
查看>>
C#Windows Form简易计算器实现(上)
查看>>
使用Matplotlab画图
查看>>
瑞星:周末拦截挂马网站数减少 新闻类网站占主打
查看>>
REST服务开发实战,互联网营销
查看>>
一起谈.NET技术,验证.NET强命称的思路和实例
查看>>
java springcloud版b2b2c社交电商spring cloud分布式微服务(十八)定时任务(Scheduling Tasks)...
查看>>
基于headless chrome的游戏资源下载实现 (初版)
查看>>
引用传递函数值
查看>>
第一周:JavaEE——课程目标
查看>>