溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

hadoop2.2集群節(jié)點刪除的方法是什么

發(fā)布時間:2021-12-10 09:15:01 來源:億速云 閱讀:202 作者:iii 欄目:云計算

這篇文章主要講解了“hadoop2.2集群節(jié)點刪除的方法是什么”,文中的講解內容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“hadoop2.2集群節(jié)點刪除的方法是什么”吧!

1.節(jié)點刪除

1)修改conf/hdfs-site.xml文件,excludes文件的目錄。如下:

<property>
    <name>dfs.hosts.exclude</name>  
   <value>/home/hadoop/hadoop-2.2.0/etc/hadoop/excludes</value> 
    <description>Names a file that contains a list of hosts that are   
      not permitted to connect to the namenode.  The full pathname of the   
      file must be specified.  If the value is empty, no hosts are   
       excluded.
    </description>
</property>

2)在excludes文件中指定要下架的機器,如:

    slave1

3)刷新配置,執(zhí)行如下命令:

bin/hadoop dfsadmin  -refreshNodes

4)查看狀態(tài)

在命令行使用命令 : bin/hadoop dfsadmin -report
或者在瀏覽器查看:http://XXXXX:50070/dfshealth.jsp
出現(xiàn)如下狀態(tài),同時Blocks的數(shù)量也在減少。
Live Nodes     :    10 (Decommissioned: 0)    
Dead Nodes     :    0 (Decommissioned: 0)    
Decommissioning Nodes     :    2    
Number of Under-Replicated Blocks    :    106106

5)再次編輯excludes文件 
    一旦完成了機器下架,它們就可以從excludes文件移除了 
   登錄要下架的機器,會發(fā)現(xiàn)DataNode進程沒有了,但是TaskTracker依然存在,需要手工處理一下

6). 遇到的問題:
        (1)剛開始刷新配置,block數(shù)目不動??赡茉颍喊踩J?
            bin/hadoop dfsadmin -safemode leave
       (2) block 數(shù)量不斷減少,但后來數(shù)量就不動了。 可能原因:集群的免密碼登陸可能有問題,檢查一下。

3.附加:免密碼登陸

同時注意權限問題。
ssh配置成功后,啟動hadoop節(jié)點出現(xiàn)Are you sure you want to continue connecting (yes/no)?
輸入yes

感謝各位的閱讀,以上就是“hadoop2.2集群節(jié)點刪除的方法是什么”的內容了,經(jīng)過本文的學習后,相信大家對hadoop2.2集群節(jié)點刪除的方法是什么這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關知識點的文章,歡迎關注!

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內容。

AI