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

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
News and Events Feed by Topic
AI
AI
S
Secure Thoughts
Schneier on Security
Schneier on Security
Help Net Security
Help Net Security
N
News | PayPal Newsroom
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Hacker News: Ask HN
Hacker News: Ask HN
W
WeLiveSecurity
Google Online Security Blog
Google Online Security Blog
T
Tailwind CSS Blog
Jina AI
Jina AI
小众软件
小众软件
S
Security @ Cisco Blogs
A
About on SuperTechFans
雷峰网
雷峰网
T
Threat Research - Cisco Blogs
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
AWS News Blog
AWS News Blog
The Register - Security
The Register - Security
V
Visual Studio Blog
PCI Perspectives
PCI Perspectives
Blog — PlanetScale
Blog — PlanetScale
L
LINUX DO - 最新话题
Stack Overflow Blog
Stack Overflow Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 叶小钗
P
Proofpoint News Feed
美团技术团队
F
Fortinet All Blogs
NISL@THU
NISL@THU
T
Troy Hunt's Blog
U
Unit 42
博客园 - Franky
B
Blog
Webroot Blog
Webroot Blog
T
The Exploit Database - CXSecurity.com
The Hacker News
The Hacker News
宝玉的分享
宝玉的分享
Y
Y Combinator Blog
The Cloudflare Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Google DeepMind News
Google DeepMind News
P
Privacy & Cybersecurity Law Blog
Latest news
Latest news
C
Cyber Attacks, Cyber Crime and Cyber Security
GbyAI
GbyAI

博客园 - 拓子

.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