Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

时间:2023-03-08 17:45:36

系统:Centos 7,内核版本3.10

本文介绍如何从0利用Docker搭建Hadoop环境,制作的镜像文件已经分享,也可以直接使用制作好的镜像文件。

一、宿主机准备工作

0、宿主机(Centos7)安装Java(非必须,这里是为了方便搭建用于调试的伪分布式环境)

1、宿主机安装Docker并启动Docker服务

  • 安装:
yum install -y docker
  • 启动:
service docker start

二、制作Hadoop镜像

(本文制作的镜像文件已经上传,如果直接使用制作好的镜像,可以忽略本步,直接跳转至步骤三)

1、从官方下载Centos镜像

docker pull centos

下载后查看镜像 docker images 可以看到刚刚拉取的Centos镜像

2、为镜像安装Hadoop

1)启动centos容器

docker run -it centos

2)容器内安装java

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

  • /usr下创建java文件夹,并将java安装包在java文件下解压
tar -zxvf jdk-8u192-linux-x64.tar.gz

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

  • 解压后文件夹改名(非必需)
mv jdk1..0_192 jdk1.

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

  • 配置java环境变量  vi ~/.bashrc ,添加内容,保存后退出
export JAVA_HOME=/usr/java/jdk1.
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib export PATH=$PATH:${JAVA_HOME}/bin

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

使环境变量生效 source ~/.bashrc

验证安装结果 java -version

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

这里注意,因为是在容器中安装,修改的是~/.bashrc而非我们使用更多的/etc/profile,否则再次启动容器的时候会环境变量会失效。

3)容器内安装hadoop

  • 在容器的/usr/local目录下解压,并修改文件夹名为hadoop
tar -zxvf hadoop-2.7..tar.gz
mv hadoop-2.7..tar.gz hadoop
  • 设置Hadoop的java-home

进入hadoop安装目录(以下操作均为hadoop的安装目录的相对路径)

cd /usr/local/hadoop/

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

执行  vi etc/hadoop/hadoop-env.sh

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZYAAAAaCAYAAACU/XqBAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAapSURBVHhe7Z2NlaQgDMevJ9uZYqYXa7GUrcMj8mEIf4I6q4tObt7vvZ1EICEQ1BHvn/s3ZwzveZre8xC/v8b5h38n/c/P/PMzzeModEk/zi8ucwzvMZRzTE4/5Poa9XKveYxyxvji5d0xU9Rxm4b5PU6pzDS+gA+yLlfG1cVlwzvUEfrgNQa97MPAK7VZ9o/RISyOtdiuMZ3mtxuraT6E4+I4m0Y5Hmg8uTJwHijjM4zN6vyrUqlTjlU53xfCXHNlVlkg2JPPFYK352x9DVlb1bly2D+jM6DQMIxPkAnTML4LKDQM4xNsYTG+Gyg0DOMTbGExvhsoNAzDMIyjQKFhGIZhHAUK/dMhy9MZ7ImP37q8h0+eXEN6kou4wAa1vZ5ul9wqtusTgdN7APozKJ8K7IoHzM1H+NATf5tfoBAH50mBv9qGM/sTQAvarqR7w9hqPtJj6vhR3n7YHSMJj9ld5+YTfOiV3+rPY0DhuYnwosDne2BEe1cPvjP7E/C1C8vA9y45vdyj1BGfLiy0FySVv2lSfoIP3XJiftkAFKqJkG984meFNEi83IHKhjLFxieni8mg2EhW0wlbZDmatNSG31A5eNv4Bq/a4NNsQZu+gk71nTjQn5otcuNoKkftRHliw4bMhi09xTZSJmZ/u4pk8YplcP0xNpM33VoTfU/9GMbLMpYW//beChPj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AxGAg+yr6r5oJN7Z0GFHojgrHbJtHFyE4TLCs3TdbG4mJ0SCO2PNnXziL9FUspvzXNfukEzc4n+GBsAQr7Z0Pg/RNCYSXfctZu9MEvTOpHLix34QlJ2RaWT4HC/rHAPxeL7b2xhcUAAsMwDMP4BCg0jO9B+6DjDcNoAYX4x/vfujy89umEDP+jfvjd5QIb1PZ6uty+VWzbP97vQvug4w3DaAGFOEE8YGFJXG3Dmf0JgI/iatwwtpqPu3681z7oeMMwWkDhIxaW/Plu0Z4tLDlPWViOvDZf+6DjDcNoAYVqIuSbt/hZIW188nIHKhvKXLGBabkF5fTZTl2+6aiWADVbGhvXvNyB6j3Qn5otclNUKkftRHli+wbJO8Q2Ui4sLj6uPpLFK5ZNr83XPuh4wzBaQGE9EbqJHhPqkrzRDtFC5yc8fz3CWnepW5OFostsQTqRTKUMLiyaLT65tl5nTsB+2d2fLd/ZYmKvzQ9QnX5BtFthhvFX/Jv/A0CMAMVPfWDMAAAAAElFTkSuQmCC" alt="" />

在文件末尾添加jdk目录(这里=后面添加的是你的jdk目录)
export JAVA_HOME=/usr/java/jdk1.
Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAARwAAAAyCAYAAACOJWQSAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAjtSURBVHhe7Z1NruQ0EMffwAjNCAHvwQKQGJgdB+gLcAJO0FuWHIBd7+AeEYJrsOij9BIJCbEcgqv8kXK57MT9kTQz/8VPbxK7XHZ9xUlHmYfT6TQ+PDwAAMDtQcEBAKwGCg4AYDVQcAAAq4GCAwBYDRQcAMBqoOAAAFYDBQcAsBooOACA1UDBAQCsBgrO28/ucBzJz6fTcTzs7D4XszuMx+Nh3FltPeyH8XSNccB9cm8Fh5LjeNiZbS32AyVUYNir9v040HkZyJQgp2Hci340Rq7bkGtByaJ1Z+fceMc4z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Z289w2gUHn64Qckv01qjKyvWVzypanx5p+m/BXKtJbs0lwrZwtzOyGMzJnTOX4CMZu9IuU3Eg+4niJ6gWHJ6vkuFzzpYifmmH81YXHL/I6UpJieeNGo0/9eXgI6MH41/yK5UZsIxzZpBd9isVBYacv9BnBp0qJiEQsiBZImfBiVErOHQs10Y7xqDT0hfl6G9Y28QSu9QfsBLsyzAP/kVM6Ne/UvmkjtT919IXsRJy8l85F49PcG3blty5c4nxwP6p/krlYL8IOxh+KouLMSd3wTymmJD5dz+064dBt8Ac2vjg/ljbRwv1VXcA1+Se5vIW0F0/ugXmQMEBZ+FvU+4jye9pLvdNd/3oFpjjnS04YWtfYW4L/+4i7LZ53NzTXP4fdNePbgEAAAh0149uAQAACHTXD+4cPsJldgAAgArd9YMFAq+f4/OiAIBlvHj2LNUOwupTML7+VAjhv4gBACwlrxdmgdH88+MPmRAAAPTyx+cf2QVGQz8B/vbZh0IYuxwAwFKexuPSYkNQwTEbAADg2qDgAABWAwUHALAaKDgAgNVAwQEArMPD+B9SNbEDQ3BzOgAAAABJRU5ErkJggg==" alt="" />
  • 检查安装的hadoop是否可用 ./bin/hadoop version (注意要在hadoop的安装目录下执行)
Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAvcAAACFCAYAAADfCtdYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAC5LSURBVHhe7Z1LkvQ6kp27Sm2yaslkViUNpEl3aw+xAa1AK8jF5Exag6Yx0Do0yKXcHWjYbdnueNHhcHeAjEcGI8/97YsbBAjAHyB5yGCSf0f/fQMwcPn8/vr6/L5YdU/kf/7Dv//+13/66/c3AC/D377/91//Ys5XAAAA4AUwCwF4Cf7/P1riCoCf5V//8W/mfAUAAABeALMQgJdACqr/9dd/+P5v/+7P5noAPJr/8Ze/7+ajtQ4AAADwAoiFj+v3H3/8k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khKXfPN6tsbT5bJdSJbFCy8dd93FfeRf5adKz4crRP0Poq3+immcYj+WesDAAAAALw3YkGKuw7vSiqXH7gvu8AC7w/9B5dCDLq35WgBmYjHy8vGPfe1r+RbbjfEwBqPy+R6XewCW6jdVdzvn2PQi18zLhGRLaF/o51LPkR1aTw/DxXrBIafjpNu/XJOCEyif9b6AAAAAADvjVjYLe4JFqsk9NJVVi1Io7rER6vfngojrtgP62+wEOzbEeF45IN4mkwWn7lu64vGNa6k9+uU8VjEyvV07AJbuttk+B7zwVcrLgETW0L/uG2p+9mn5XDes69ct/wSteiftT4AAAAAwNvyd9//Bvsi6z/tMpc3AAAAAElFTkSuQmCC" alt="" />
  • 配置hadoop环境变量

前面在验证hadoop命令的时候需要在hadoop的安装目录下执行./bin/hadoop,为了方便在任意地方执行hadoop命令,配置hadoop的全局环境变量,与java一样,修改~/.bashrc文件

执行  vi ~/.bashrc

添加内容

export HADOOP_HOME=/usr/local/hadoop
export PATH=$PATH:${JAVA_HOME}/bin:${HADOOP_HOME}/bin:${HADOOP_HOME}/sbin

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

(P.S. “HADOOP_HOME=”后面配置hadoop安装目录;

这里的PATH变量是java和hadoop结合的;

这样配置之后,可以在任意位置执行hadoop命令)

source ~/.bashrc 使环境变量生效

hadoop version 验证变量生效

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

4)为容器安装辅助程序

下面安装的程序都是在制作镜像过程中需要用的工具或踩到的坑,提前装好避免一些奇怪问题

  • 配置时间同步服务器

  安装ntpdate yum install -y ntpdate

  配置时间同步服务器

ntpdate ntp1.aliyun.com
ntp1.aliyun.com为时间同步服务器地址,百度可以查到可用服务器
  • 安装ssh

  检查是否已经默认安装SSHClient和SSH Server

rpm -qa | grep ssh

  出现如下结果表示已经安装

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)aaarticlea/png;base64,iVBORw0KGgoA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wfma7RT7ObdE/kcMSnJXA8fGpDNSF1idRWqHDm0c47PPET8GwpwtqPMXgWDphTAbPFW7OF6dBJp9WzbCMmobiUGdRWKbMA5fjvoxPs7+5H+AM1BHpo7dqssOWQABbbU72RE/yYnTPOT3OdqTkwwE3RbARSCY8m3IwdOeZ9WOjwfAmELyLLBshNcoc0fGdIZkGYv5wTIwyEuTDvZ9jHxqO8N+zi2R/xGdXXm6aNVpAcDrlGDZ94ifBlyWFjBnKQmAHJZeCLPBU7eDoNQClpRxLBshim0iozrLwPz9GB/nTOA/0t1TfN8THVmpC/Df6xEx3GnBqfD3SY74aZOCSwmMVU6hLlMkl4ZexDYDSO3ilzdlCRVRZFBthNfEdnKymtIZ7a/6d/1Ehv035VPobTdrC+fiIT+Ckx3/1RLq8aVyaicmslMc8dMkL2uEZVwkBtlgIrP0IjwNWH2vmO3g6WMrr16GqzIoNiJAMkj1NKHN6CwlEloWkyHa3o/xcfZHLCzhCclJuF4c51IQC0s8YGVcL45zKYiFJR6wMq6XMwHL223ZyOlarju3jljoOI5zTYiFjnMarP+k6x2nD1ZAvphd4iN7/PqFy4ozLOvM8e5iabkt63b52mf9J13vOH2wgmKLxOmZ/hx+5nmK450wkZ1im8Axfe42H+s/6XrHafLJ8n8HVa5DPO+idwAAAABJRU5ErkJggg==" alt="" />
  如未安装,使用如下命令安装
yum install openssh-clients
yum install openssh-server

  测试ssh是否可用

ssh localhost

    测试之后就是通过ssh登陆了本机,输入 exit 退回到普通终端登陆。

  • 安装rsync
yum -y install rsync
  • 安装dbus
yum -y install dbus

5)将容器制作成镜像

宿主机打开新终端,注意打包镜像操作都是在宿主机内做的,(即你安装Docker的那台机器)。

  • 查看容器id

在宿主机内查看刚刚使用的容器ID

docker ps

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

  • 打包
docker commit -m "centos7 with hadoop" c0905da23733 centos7/hadoop

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

命令说明:

docker commit [OPTIONS] 容器ID [镜像[:版本标签]]
  -m 提交说明
  centos7/hadoop 镜像名称,如果不叫版本标签,默认为latest
  • 查看打包结果 docker images

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

  • 提交镜像

完成上述后已经交将容器打包为本地镜像,下面将本地镜像提交到远程仓库,这里上传到阿里云的镜像仓库,需要事先注册阿里云账号。

阿里云创建仓库https://cr.console.aliyun.com/

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

仓库创建成功后打开仓库可以看到操作指南,在宿主机终端按照指南进行后续操作

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

终端登陆

docker login --username=魔女小豚 registry.cn-beijing.aliyuncs.com

推送

$ sudo docker login --username=魔女小豚 registry.cn-beijing.aliyuncs.com
$ sudo docker tag [ImageId] registry.cn-beijing.aliyuncs.com/jing-studio/centos7-hadoop:[镜像版本号]
$ sudo docker push registry.cn-beijing.aliyuncs.com/jing-studio/centos7-hadoop:[镜像版本号]

根据实际镜像信息替换示例中的[ImageId]和[镜像版本号]参数。

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

三、Hadoop集群配置

1、从registry中拉取镜像

$ sudo docker pull registry.cn-beijing.aliyuncs.com/jing-studio/centos7-hadoop

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

2、启动镜像

按照下述方式,根据需要的节点数启动相应数量的容器(注意为每个容器指定不同的容器名和主机名),这里启动3个容器作为示例

$ docker run -d --name hadoop0 -h hadoop0 -p 50070:50070 --privileged=true registry.cn-beijing.aliyuncs.com/jing-studio/centos7-hadoop /usr/sbin/init

其中,-d指定容器启动的终端在后台执行(在需要使用的容器终端的时候再显示进入容器,如3-3所述),--name hadoop0 指定容器名称,-h hadoop0 指定容器的主机名(这里千万注意,主机名不要包含下划线,对,就是它"_",不要包含下划线、不要包含下划线!!!否则不能启动集群。当初因为这问题采坑好久,都是泪),--privileged=true 指定容器获得全部权限, registry.cn-……指定镜像, /usr/sbin/init指定运行终端

需要开放的端口:namenode开放50070,9000,sourcemanager开放8088

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

检查容器是否启动 $ docker ps

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

3、进入容器,查看容器ip

$ docker exec -it hadoop0 /bin/bash

其中,-it表明显式打开容器终端,

查看全部容器ip

$ ip addr

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

建议使用3-2启动镜像以及3-3进入容器的方式运行,在开始搭建的时候各种采坑,才找到这种合适的方式,在容器使用过程中不会出现系统服务无法启动的情况。

4、配置主机映射

$ vi /etc/hosts

将每个容器的Ip地址和主机名添加到hosts文件中

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

注意集群中每个节点都需要配置上述主机映射。

5、为各个集群节点配置彼此间的ssh免密登陆

  • 生成本机公钥私钥
cd ~/.ssh/          #若没有~/.ssh/目录,先执行一次ssh localhost
ssh-keygen -t rsa      # 会有提示,都按回车就可以,产生公钥私钥

在~/.ssh目录下生成密钥文件,id_dsa: 为私钥;id_dsa.pub: 为公钥

  • 彼此发送密钥
ssh-copy-id ha_slave1

注意要在每个集群节点上生成密钥、并为其他全部集群节点发送密钥,即在master上执行一次生成密钥,然后执行两次发送密钥,分别发送给slave1 、slave2;然后再在slave1上生成密钥发送密钥给其他节点,再在slave2上再次执行。

5.1 关闭防火墙

service iptables stop

完成上述准备工作后对hadoop集群进行配置,在配置之前,考虑集群中节点规划,即,哪些节点作为HDFS的namenode、datanode、secnamenode,哪些节点作为yarn的sourcemanager、nodemanager。本文示例集群规划如下:

  hdfs yarn
master namenoder + datanode nodemanager
slave1  datanode sourcemanager + nodemanger
slave2 secnamenode + datanode nodemanger

6、选择一个节点,进入节点,进行HDFS配置(注意进入到hadoop安装目录,在我的镜像里是 /usr/local/hadoop )

  • 配置core-site.xml文件,指定HDFS主节点
vi etc/hadoop/core-site.xml

  添加配置内容

<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://had0:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/data/hadoopdata</value>
</property> </configuration>

指定hdfs主节点,并指定临时文件目录,存储hadoop运行过程中产生的文件的目录(注意一定配置在有权限的目录下)

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

  • 配置hdfs-site.xml
vi etc/hadoop/hdfs-site.xml

添加内容

<configuration>
<property>
<name>dfs.namenode.name.dir</name>
<value>/home/data/hadoopdata/name</value>
</property>
  <!--配置存储namenode数据的目录-->
  <property>
<name>dfs.datanode.data.dir</name>
<value>/home/data/hadoopdata/data</value>
</property>
  <!--配置存储datanode数据的目录-->
  <property>
<name>dfs.replication</name>
<value></value>
</property>
  <!--配置部分数量-->
  <property>
    <name>dfs.secondary.http.address</name>
    <value>had2:</value>
  </property>
  <!--配置第二名称节点 --> </configuration>

7、YARN配置(依然在上述选择的节点进行配置)

  • 配置yarn-site.xml
vi etc/hadoop/yarn-site.xml

添加内容

<configuration>
<!-- Site specific YARN configuration properties -->
<property>
<name>yarn.resourcemanager.hostname</name>
<value>slave1</value>
</property>
<!--配置yarn主节点--> <property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<!--配置执行的计算框架--> </configuration>
  • 配置mapred-site.xml
复制自带的临时文件,并对文件进行编辑
cp etc/hadoop/mapred-site.xml.template etc/hadoop/mapred-site.xml
vi etc/hadoop/mapred-site.xml

添加内容

<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
  <!--配置mapreduce任务所在的资源调度平台-->
</configuration>
  • 配置slaves
vi etc/hadoop/slaves

添加内容

master
slave1
slave2

8、将HDFS和YARN配置发送到全部节点

需要给集群中全部节点进行3-5、3-6的配置操作,在一个节点上配置完成后,通过远程发送配置文件,对其他节点进行配置。上述配置文件都在"hadoop安装目录/etc”下,方便起见,通过将etc文件夹发送到其他节点容器来完成配置。注意,此操作也要在hadoop安装目录下执行;通过此操作要把配置文件发送到所有集群节点上。

scp -r etc ha_slave1:/usr/local/hadoop/

四、启动HDFS

  • 初始化NameNode的元数据目录,格式化文件系统

此操作在namenode节点上初始化一个全新的namenode的元数据存储目录(为hdfs-site.xml中配置的namenode数据的目录),生成记录元数据的文件fsimage,生成集群的相关标识,必须在HDFS的NameNode节点执行操作。

hadoop namenode -format

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

上图表示格式化成功

  • 启动HDFS,可以在任意节点启动
start-dfs.sh
  • 验证启动结果(可以在每个节点上都进行验证)
jps

可以看到当前节点上已经启动了DataNode和NameNode(节点上启动哪些进程取决于集群规划)

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

补充:关于HDFS的格式化,如果格式化成功,则只能格式化一次,如果HDFS启动后需要重新格式化,格式化的步骤:

1)删除namenode数据目录、datanode数据目录(在配置文件中指定的路径)

2)重新格式化

datanode 的想过数据信息在启动hdfs的时候生成,两个文件(version)中的cluster ID相同时候才认为节点属于同一集群,datanode才能受namenode管理,如果没有删除目录就去进行格式化,会造成节点不属于同一集群的问题。

五、启动YARN

  • 必须在SourceManager上启动
start-yarn.sh
  • 验证结果
jps

Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)

由于前面启动了HDFS,所以此时节点上可以看到hdfs和yarn的进程。

至此,使用Docker进行hadoop完全分布式搭建的工作完成。

datanode可以在线扩容,只需要把一个datanode的namenode配置成当前使用的namenode,然后启动。如果想删除datanode,则需要重新格式化namenode节点。