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

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

分享到微博請遵守國家法律
安平县| 建宁县| 甘南县| 张家港市| 三原县| 饶平县| 绥中县| 雷山县| 西和县| 陆丰市| 阳信县| 隆子县| 隆德县| 汤原县| 惠水县| 德庆县| 三河市| 青神县| 三江| 和顺县| 襄汾县| 怀仁县| 广昌县| 永嘉县| 满洲里市| 曲阳县| 翁牛特旗| 红桥区| 元阳县| 易门县| 乐山市| 芦溪县| 梨树县| 前郭尔| 乡城县| 浮梁县| 灵寿县| 双鸭山市| 赤城县| 安宁市| 永春县|