最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(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)計的評論 (共 條)

分享到微博請遵守國家法律
鄂托克旗| 呼玛县| 桦川县| 绥宁县| 无棣县| 二连浩特市| 大港区| 葫芦岛市| 南召县| 贡嘎县| 乡城县| 五家渠市| 黎平县| 万安县| 西华县| 宁国市| 长宁区| 尼玛县| 临湘市| 铁力市| 临猗县| 金昌市| 惠东县| 分宜县| 西盟| 衡东县| 芮城县| 桐城市| 宽城| 南漳县| 镇沅| 贡觉县| 宾川县| 平湖市| 会泽县| 海盐县| 连云港市| 都匀市| 巴青县| 云南省| 新乐市|