五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

【大數(shù)據(jù)學(xué)習(xí)篇3】HDFS命令操作與MR單詞統(tǒng)計

2023-05-13 11:07 作者:下班被游戲打-  | 我要投稿


#在/目錄創(chuàng)建一個為test名字的文件夾

[hd@master bin]$ hdfs dfs -mkdir /test

#查看/目錄

[hd@master bin]$ hdfs dfs -ls?

Found 1 items

drwxr-xr-x? ?- hd supergroup? ? ? ? ? 0 2020-02-27 01:02 /test

#創(chuàng)建一個本地的txt文件

[hd@master ~]$ echo "abc123def456" > hello.txt?

#把創(chuàng)建的文件上傳到hdfs

[hd@master ~]$ hdfs dfs -put hello.txt? /?

#在hdfs查看上傳的文件

[hd@slave02 ~]$ hdfs dfs -cat /hello.txt

abc123def456

#下載hdfs文件到本地的linux當(dāng)前目錄

[hd@slave02 ~]$ ll

total 0

drwxrwxr-x. 4 hd hd 30 Feb 26 23:08 apps

#下載hdfs文件到當(dāng)前目錄

[hd@slave02 ~]$ hdfs dfs -get /hello.txt .

[hd@slave02 ~]$ ll

total 4

drwxrwxr-x. 4 hd hd 30 Feb 26 23:08 apps

-rw-r--r--. 1 hd hd 13 Feb 27 01:13 hello.txt

[hd@slave02 ~]$?

[hd@slave02 ~]$ cat hello.txt?

abc123def456


MapReduct執(zhí)行單詞統(tǒng)計的程序

#創(chuàng)建文件

[hd@master ~]$ vi words.txt

Hello World Bye World

Hello Hadoop Bye Hadoop

Bye Hadoop Hello Hadoop

#上傳文件

[hd@master ~]$ hdfs dfs -mkdir /word

[hd@master ~]$ hdfs dfs -put words.txt /word

#執(zhí)行單詞統(tǒng)計的樣例

[hd@master hadoop]$ hadoop jar /home/hd/apps/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.0.0.jar wordcount /word/words.txt /out



【大數(shù)據(jù)學(xué)習(xí)篇3】HDFS命令操作與MR單詞統(tǒng)計的評論 (共 條)

分享到微博請遵守國家法律
青冈县| 和平县| 开平市| 喜德县| 和平区| 鹿泉市| 深州市| 宜君县| 贺兰县| 嘉峪关市| 松桃| 永平县| 淳化县| 都江堰市| 绵阳市| 桂东县| 鹰潭市| 无为县| 炎陵县| 海门市| 石景山区| 泸定县| 修武县| 长兴县| 景宁| 舒兰市| 龙井市| 久治县| 平远县| 凤庆县| 新建县| 凉山| 云和县| 裕民县| 莲花县| 吉水县| 铜川市| 白朗县| 调兵山市| 建始县| 武威市|