zoukankan      html  css  js  c++  java
  • hadoop 节点退役和服役

    节点的服役和退役(hdfs)
    ----------------------


    黑白名单的组合情况
    -------------------------
    include //dfs.include
    exclude //dfs.hosts.include

    白名单   黑名单

    include  exclude  Interpretation

    No         No    不能连接
    No   Yes    不能连接
    Yes    No    可以连接
    Yes    Yes    可以连接,将会退役状态。

    [服役]
    [添加新节点]
    1.在dfs.include文件中包含新节点名称,该文件在nn的本地目录。
    [白名单]
    [s129(名称节点):/soft/hadoop/etc/dfs.include.txt]
    s126
    s127
    s128
    2.在hdfs-site.xml文件中添加属性.
    <property>
    <name>dfs.hosts</name>
    <value>/soft/hadoop/etc/dfs.include.txt</value>
    </property>

    3.在nn上刷新节点
    $>hdfs dfsadmin -refreshNodes

    4.在slaves文件中添加新节点ip(主机名/ip)
    s126
    s127
    s128
    s125 //新添加的

    5.单独启动新的节点中的datanode
    [s205]
    $>hadoop-daemon.sh start datanode


    [退役]
    1.添加退役节点的ip到黑名单,不要更新白名单.
    [/soft/hadoop/etc/dfs.hosts.exclude.txt]
    s205

    2.配置hdfs-site.xml
    <property>
    <name>dfs.hosts.exclude</name>
    <value>/soft/hadoop/etc/dfs.hosts.exclude.txt</value>
    </property>

    3.刷新nn节点
    $>hdfs dfsadmin -refreshNodes

    4.查看webui,节点状态在decommisstion in progress.

    5.当所有的要退役的节点都报告为Decommissioned,数据转移工作已经完成。

    6.从白名单删除节点,并刷新节点
    [s129:/soft/hadoop/etc/dfs.include.txt]
    ...

    $>hdfs dfsadmin -refreshNodes

    7.从slaves文件中删除退役节点

  • 相关阅读:
    bzoj 1017 魔兽地图DotR
    poj 1322 chocolate
    bzoj 1045 糖果传递
    poj 3067 japan
    timus 1109 Conference(二分图匹配)
    URAL 1205 By the Underground or by Foot?(SPFA)
    URAL 1242 Werewolf(DFS)
    timus 1033 Labyrinth(BFS)
    URAL 1208 Legendary Teams Contest(DFS)
    URAL 1930 Ivan's Car(BFS)
  • 原文地址:https://www.cnblogs.com/YuanWeiBlogger/p/11545142.html
Copyright © 2011-2022 走看看