日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

hadoop初始化(hdfs格式化)+简单测试(转载+自己整理)

發(fā)布時間:2023/12/31 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 hadoop初始化(hdfs格式化)+简单测试(转载+自己整理) 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

?

操作具體操作內(nèi)容
初始化hdfs文件系統(tǒng)hdfs namenode -format
啟動集群~/bigdata/hadoop-3.1.2/sbin/start-dfs.sh&&~/bigdata/hadoop-3.1.2/sbin/start-yarn.sh
hdfs界面http://desktop:9870/
yarn界面http://desktop:8088/

words.txt內(nèi)容如下:

hello tom hello jerry hello kitty hello world hello tom

?

然后測試下自帶的小例子:

hdfs dfs -put words.txt /

hadoop jar hadoop-mapreduce-examples-3.1.2.jar wordcount hdfs://Desktop:9000/words.txt hdfs://Desktop:9000/wcout

hdfs dfs -ls /wcout

hdfs dfs -cat /wcout/part-r-00000

#############################附錄#######################################

如果發(fā)現(xiàn)jps中datanode起不來,

可以把下面的兩處的clusterid改為一致(推薦修改data/current/VERSION)

然后重新啟動hdfs集群即可:

~/bigdata/hadoop-3.1.2/sbin/start-dfs.sh&&~/bigdata/hadoop-3.1.2/sbin/start-yarn.sh

?

(Python3.6) appleyuchi@Laptop:dfs$ grep -ri clusterid
data/current/VERSION:clusterID=CID-3ef50261-5a59-4b70-9f7f-ce29908c7818
Binary file data/current/BP-619379440-192.168.0.102-1593400448542/current/finalized/subdir0/subdir1/blk_1073742287 matches
Binary file data/current/BP-619379440-192.168.0.102-1593400448542/current/finalized/subdir0/subdir1/blk_1073742237 matches
Binary file data/current/BP-619379440-192.168.0.102-1593400448542/current/finalized/subdir0/subdir2/blk_1073742437 matches
Binary file data/current/BP-619379440-192.168.0.102-1593400448542/current/finalized/subdir0/subdir2/blk_1073742337 matches
Binary file data/current/BP-619379440-192.168.0.102-1593400448542/current/finalized/subdir0/subdir2/blk_1073742338 matches
Binary file data/current/BP-619379440-192.168.0.102-1593400448542/current/finalized/subdir0/subdir2/blk_1073742487 matches
name/current/VERSION:clusterID=CID-a84621b5-31b1-4a75-b94a-65eda4855e05
(Python3.6) appleyuchi@Laptop:dfs$ subl data/current/VERSION

?

?

?

?

總結

以上是生活随笔為你收集整理的hadoop初始化(hdfs格式化)+简单测试(转载+自己整理)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。