设为首页 加入收藏

TOP

Hadoop MapReduce 上的 WordCount
2019-03-25 12:15:32 】 浏览:78
Tags:Hadoop MapReduce WordCount
  1. 首先开启hdfs 和 yarn

    sbin/start-dfs.sh 
    sbin/start-yarn.sh
    
  2. 在 hdfs 上创建目录

     hdfs dfs -mkdir -p /wordcount/input
    
  3. 在linux 下创建 a.log b.txt 两个文件,再把两个文件通过put 上传至 hdfs

    hdfs dfs -put a.log /wordcount/input
    hdfs dfs -put b.txt /wordcount/input
    
  4. 寻找到 example 示例

find ./ -name '*example*.jar'
  1. 运行 示例
hadoop jar   ./share/hadoop/mapreduce1/hadoop-examples-2.6.0-mr1-cdh5.7.0.jar wordcount  /wordcount/input /wordcount/output
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇centos-7 部署hadoop2.5.1 >&g.. 下一篇centos-7 部署hadoop2.5.1 >&g..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目