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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
L
LangChain Blog
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
IT之家
IT之家
The Register - Security
The Register - Security
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
博客园 - 聂微东
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
W
WeLiveSecurity
博客园_首页
A
About on SuperTechFans
G
Google Developers Blog
博客园 - 叶小钗
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
量子位
Google DeepMind News
Google DeepMind News
博客园 - 【当耐特】
aimingoo的专栏
aimingoo的专栏
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 三生石上(FineUI控件)
N
News | PayPal Newsroom
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
AI
AI
TaoSecurity Blog
TaoSecurity Blog
P
Proofpoint News Feed
Attack and Defense Labs
Attack and Defense Labs
S
Secure Thoughts
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - 司徒正美
www.infosecurity-magazine.com
www.infosecurity-magazine.com
J
Java Code Geeks
Hacker News - Newest:
Hacker News - Newest: "LLM"
爱范儿
爱范儿
S
SegmentFault 最新的问题
Martin Fowler
Martin Fowler
Vercel News
Vercel News
Schneier on Security
Schneier on Security
Know Your Adversary
Know Your Adversary
H
Heimdal Security Blog
N
News and Events Feed by Topic

博客园 - 拓子

.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