日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發(fā)布時間:2023/12/31 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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

?

?

?

?

總結(jié)

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

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