如何找到JAR:/home/hadoop/contrib/streaming/hadoop-streaming.jar

har*_*att 5 python java hadoop amazon-web-services emr

我正在练习一个关于亚马逊EMR的视频教程.我被困住,因为我无法继续,因为我收到此错误

Not a valid JAR: /home/hadoop/contrib/streaming/hadoop-streaming.jar

请注意,教程是旧的,它使用较旧的Emr版本.我使用的最新版本是一个问题?

我采取的步骤是在putty中输入凭证后

1)Hadoop

2)mkdir streamingCode`

3)wget -o ./streamingCode/wordSplitter.py s3://elasticmapreduce/samples/wordcount/wordSplitter.py

4)hadoop jar contrib/streaming/hadoop-streaming.jar -files streamingCode/wordSplitter.py -mapper wordSplitter.py输入s3:// elasticmapreduce/samples/wordcount/input -output streamingCode/wordCountOut -reducer aggregate`

我无法执行第4步,因为我收到以下错误

Not a valid JAR: /home/hadoop/contrib/streaming/hadoop-streaming.jar

Chr*_*erB 7

最新版本的EMR Hadoop仍然提供Hadoop流媒体jar.从EMR版本4.0.0开始,可以在以下位置找到它/usr/lib/hadoop-mapreduce/hadoop-streaming.jar.

可以在http://docs.aws.amazon.com/ElasticMapReduce/latest/ReleaseGuide/emr-release-differences.html找到版本之间差异的另一个好资源.


小智 6

对于变量HADOOP_STREAMING,根据您使用的HDP,获取路径要复杂一些。

通过命令搜索它的位置:find / -name'hadoop-streaming * .jar'

Src:http//thecoatlessprofessor.com/programming/installing-r-studio-server-on-hortonworks-virtual-box-image-and-rmr2-aka-rhadoop-r-package/