惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

AWS News Blog
AWS News Blog
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
A
About on SuperTechFans
WordPress大学
WordPress大学
MongoDB | Blog
MongoDB | Blog
T
Tailwind CSS Blog
美团技术团队
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
U
Unit 42
有赞技术团队
有赞技术团队
G
GRAHAM CLULEY
Scott Helme
Scott Helme
小众软件
小众软件
T
Threatpost
S
Securelist
SecWiki News
SecWiki News
Recent Announcements
Recent Announcements
L
LINUX DO - 最新话题
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
Y
Y Combinator Blog
aimingoo的专栏
aimingoo的专栏
Security Latest
Security Latest
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
Schneier on Security
Schneier on Security
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
S
Secure Thoughts
博客园 - 聂微东
The Hacker News
The Hacker News
Stack Overflow Blog
Stack Overflow Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cloudbric
Cloudbric
V
V2EX
Attack and Defense Labs
Attack and Defense Labs
宝玉的分享
宝玉的分享
Vercel News
Vercel News

博客园 - 拓子

.net编码规则 tensorflow mnist The tensorflow simplest calculate python opencv english opencv 图片识别 随机概率 从excel 导入数据绘制 散点图 tensor flow 线性回归 一些搞笑,但有意义的图片 基于python玩转人工智能最火框架之TensorFlow人工智能&深度学习介绍 win10 64下anaconda4.2.0(python3.5) PYTHON 爬虫 baidu美女图片 falkonry python CENTOS重新安装JDK 搭建Hadoop的环境 目录和权限 centos基本命令
hadoop wordcout测试
拓子 · 2019-01-13 · via 博客园 - 拓子

hadoop wordcout测试

安装好hadoop 环境后,启动HDFS等服务;输密码
1004 start-all.sh
查看启动情况
1006 jps

1007 cd ~ 切换到用户默认目录 

创建数据文件data.txt,输送值 hello beijing hello China 
1028 vi data.txt

切到hadoop-2.4.1
1032 cd /usr/local/bin/hadoop-2.4.1/

在hdfs文件系统中新建data文件夹,用来放输入及输出的文件;

hdfs dfs -p /data/

将data.txt文件上传到/data中为输入文件
1039 hdfs dfs -put ~/data.txt /data

查看上传到hdfs文件系统中的data.txt文件
1040 hdfs dfs -ls /
1041 hdfs dfs -ls /data

cd /usr/local/bin/hadoop-2.4.1/share/...hadoop-mapreduce-examples-2.4.1.jar文件所在目录。

执行WORDCOUT命令,以下 /data/data.txt  为hdfs系统的输入文件,/data/ouput为计算结果文件。
1071 hadoop jar hadoop-mapreduce-examples-2.4.1.jar wordcount /data/data.txt /data/ouput
当map 及preduce都100%计算完成时,查看计算结果
1082 hdfs dfs -ls /data/ouput
1083 hdfs dfs -cat /data/ouput/part-r-00000