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

推荐订阅源

B
Blog
I
InfoQ
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
博客园_首页
The Cloudflare Blog
博客园 - 【当耐特】
Engineering at Meta
Engineering at Meta
罗磊的独立博客
月光博客
月光博客
V
V2EX
大猫的无限游戏
大猫的无限游戏
腾讯CDC
GbyAI
GbyAI
云风的 BLOG
云风的 BLOG
Stack Overflow Blog
Stack Overflow Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Attack and Defense Labs
Attack and Defense Labs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Google Online Security Blog
Google Online Security Blog
B
Blog RSS Feed
Webroot Blog
Webroot Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
Netflix TechBlog - Medium
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
C
CERT Recently Published Vulnerability Notes
人人都是产品经理
人人都是产品经理
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Recent Announcements
Recent Announcements
Cyberwarzone
Cyberwarzone
G
Google Developers Blog
H
Heimdal Security Blog
MyScale Blog
MyScale Blog
The Register - Security
The Register - Security
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
T
Tenable Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
O
OpenAI News
C
Check Point Blog
Forbes - Security
Forbes - Security
SecWiki News
SecWiki News
K
Kaspersky official blog
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Full Disclosure
阮一峰的网络日志
阮一峰的网络日志

博客园 - 拓子

.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