• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
导航菜单
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • windows
  • 服务器硬件
  • 服务器运维
  • 云计算
  • 虚拟化
  • IIS教程
  • Linux
  • Apache
  • Ftp
  • DNS
  • Nginx
您的位置:首页 > 服务器 >云计算 > Hadoop中自带的examples之wordcount应用案例,hadoopwordcount

Hadoop中自带的examples之wordcount应用案例,hadoopwordcount

作者:网友 字体:[增加 减小] 来源:互联网

本文主要包含hadoop examples,hadoop examples.jar,hadoop wordcount,hadoop运行wordcount,hadoop wordcount详解等服务器相关知识,网友希望可以进行参考

Hadoop中自带的examples之wordcount应用案例,hadoopwordcount


大家都知道hadoop中自带了很多例子,那么怎么用呢,今天主要测试下hadoop中的wordcount程序jar包:

1、首先启动hadoop

2、准备数据:vim words, 写入

hello tom

hello jerry

hello kitty 

hello tom

hello bbb

3、将数据上传到HDFS

hadoop fs -put words /user/guest/words.txt

4、运行examples中自带的wordcount程序jar包

guest@master:/usr/hadoop/share/hadoop/mapreduce$ hadoop jar hadoop-mapreduce-examples-2.4.0.jar 

An example program must be given as the first argument.

Valid program names are:

  aggregatewordcount: An Aggregate based map/reduce program that counts the words in the input files.

  aggregatewordhist: An Aggregate based map/reduce program that computes the histogram of the words in the input files.

  bbp: A map/reduce program that uses Bailey-Borwein-Plouffe to compute exact digits of Pi.

  dbcount: An example job that count the pageview counts from a database.

  distbbp: A map/reduce program that uses a BBP-type formula to compute exact bits of Pi.

  grep: A map/reduce program that counts the matches of a regex in the input.

  join: A job that effects a join over sorted, equally partitioned datasets

  multifilewc: A job that counts words from several files.

  pentomino: A map/reduce tile laying program to find solutions to pentomino problems.

  pi: A map/reduce program that estimates Pi using a quasi-Monte Carlo method.

  randomtextwriter: A map/reduce program that writes 10GB of random textual data per node.

  randomwriter: A map/reduce program that writes 10GB of random data per node.

  secondarysort: An example defining a secondary sort to the reduce.

  sort: A map/reduce program that sorts the data written by the random writer.

  sudoku: A sudoku solver.

  teragen: Generate data for the terasort

  terasort: Run the terasort

  teravalidate: Checking results of terasort

  wordcount: A map/reduce program that counts the words in the input files.

  wordmean: A map/reduce program that counts the average length of the words in the input files.

  wordmedian: A map/reduce program that counts the median length of the words in the input files.

  wordstandarddeviation: A map/reduce program that counts the standard deviation of the length of the words in the input files.

从这里可以看到wordcount程序;然后执行:

hadoop jar hadoop-mapreduce-examples-2.4.0.jar wordcount /user/guest/words.txt /user/guest/wordcount

查看结果:hello 5 Jerry 1 kitty 1 tom 2 bbb 1

版权声明:本文为博主原创文章,未经博主允许不得转载。

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • Hadoop中自带的examples之wordcount应用案例,hadoopwordcount

相关文章

  • 这会不会是顶好的实现万物互联的途径?--设备智能化改造,万物--
  • 《转》openstack中删除虚拟主机,状态一直deleting,《转》openstack
  • 开源微内核seL4 microkernel,sel4microkernel
  • R720 disable hyperthreading,r720hyperthreading
  • Elasticsearch之Nested Object Mapping,elasticsearch
  • What's Wrong With Hue Oozie Editor?,hueoozie
  • Hadoop之——分布式集群安装过程简化版,hadoop集群简化版
  • Docker 使用方法总结之:容器的基本操作,docker基本操作
  • Azure云平台学习之路(三)——Cloud Services,azurecloud
  • 配置KVM虚拟机的网络,Bridge和Nat方式,kvmnat

文章分类

  • windows
  • 服务器硬件
  • 服务器运维
  • 云计算
  • 虚拟化
  • IIS教程
  • Linux
  • Apache
  • Ftp
  • DNS
  • Nginx

最近更新的内容

    • elasticsearch JAVA客户端操作---搜索的过滤、分组高亮,elasticsearchjava
    • Hadoop之——有趣问答(一),hadoop问答
    • 2015.6.8,2015年6月8日
    • hive中使用case、if:一个region统计业务(hive条件函数case、if、COALESCE语法介绍:CONDITIONAL FUNCTIONS IN HIVE),hivenotin
    • 架构设计(ASP.NET MVC+Knockout+Web API+SignalR),knockoutsignalr
    • spark core源码分析7 Executor的运行,sparkexecutor
    • IBM Symphony开发,ibmsymphony开发
    • request.getScheme()的使用方法,request.getscheme
    • Greenplum数据库扩容实务(上)-准备工作,greenplum实务
    • 我的hadoop2.4安装过程,hadoop2.4安装过程

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有