hadoop / bin / hadoop没有示例jar [英] hadoop/bin/hadoop doesn't have the example jar

查看:720
本文介绍了hadoop / bin / hadoop没有示例jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了hadoop 2.2.0并尝试运行示例wordcount程序。为此,我首先使用以下方式将数据导入到hdfs中:

  bin / hadoop fs -copyFromLocal / home / prassanna / Desktop / input / input 

之后,我试着运行字数jar文件:

  root @ prassanna-Studio-1558:/ usr / local / hadoop#bin / hadoop jar hadoop * examples * .jar wordcount / input -output 

但它显示:不是有效的JAR:/ usr / local / hadoop / hadoop *例子* .jar



我检查了 usr / local / hadoop / bin / hadoop 目录,并且没有hadoop示例jar。

解决方案

Jar 你正在寻找的文件在这个目录中:

  hadoop_root / share / hadoop / mapreduce / hadoop-mapreduce-examples-2.2 .0.jar 

并且应该使用如下命令运行:

  $ yarn jar hadoop_root / share / hadoop / mapreduce / hadoop-mapreduce-examples-2.2。 0.jar wordcount / input / output 


I installed hadoop 2.2.0 and try to run sample wordcount program. For that, first I imported data in to hdfs using:

bin/hadoop fs -copyFromLocal /home/prassanna/Desktop/input /input

After that, I tried to run word count jar file using:

root@prassanna-Studio-1558:/usr/local/hadoop# bin/hadoop jar hadoop*examples*.jar wordcount /input -output

but it showed: Not a valid JAR: /usr/local/hadoop/hadoop*examples*.jar

I checked in usr/local/hadoop/bin/hadoop directory and there is no hadoop example jar.

解决方案

The Jar file you are looking for is in this directory:

hadoop_root/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.2.0.jar

and should be run with a command like this:

$ yarn jar hadoop_root/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.2.0.jar wordcount /input /output

这篇关于hadoop / bin / hadoop没有示例jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆