简体   繁体   English

Hadoop流作业执行中映射器的“文本文件繁忙”错误

[英]“Text file busy” error for the mapper in a Hadoop streaming job execution

I have an application that creates text files with one line each and dumps it to hdfs. 我有一个创建文本文件的应用程序,每个文本文件只有一行,然后将其转储到hdfs。 This location is in turn being used as the input directory for a hadoop streaming job. 该位置又被用作hadoop流作业的输入目录。

The expectation is that the number of mappers will be equal to the "input file split" which is equal to the number of files in my case. 期望的是,映射程序的数量将等于“输入文件分割”,它等于我的情况下的文件数量。 Some how all the mappers are not getting triggered and I see a weird issue in the streaming output dump: 某些未触发所有映射器的方式,我在流输出转储中看到一个奇怪的问题:

Caused by: java.io.IOException: Cannot run program "/mnt/var/lib/hadoop/tmp/nm-local-dir/usercache/hadoop/appcache/application_1411140750872_0001/container_1411140750872_0001_01_000336/./CODE/python_mapper_unix.py": error=26, Text file busy 引起原因:java.io.IOException:无法运行程序“ /mnt/var/lib/hadoop/tmp/nm-local-dir/usercache/hadoop/appcache/application_1411140750872_0001/container_1411140750872_0001_01_000336/./CODE/python_mapper_unix.py”:错误= 26,文本文件忙

"python_mapper.py" is my mapper file. “ python_mapper.py”是我的映射器文件。

Environment Details: A 40 node aws r3.xlarge AWS EMR cluster [No other job runs on this cluster] When this streaming jar is running, no other job is running on the cluster, hence none of the external processes should be trying to open the "python_mapper.py" file 环境详细信息:一个40节点aws r3.xlarge AWS EMR集群[此集群上没有其他作业在运行]当此流媒体jar运行时,该集群上没有其他作业在运行,因此,任何外部进程都不应尝试打开“ python_mapper.py”文件

Here is the streaming jar command: 这是流jar命令:

ssh -o StrictHostKeyChecking=no -i hadoop@ hadoop jar /home/hadoop/contrib/streaming/hadoop-streaming.jar -files CODE -file CODE/congfiguration.conf -mapper CODE/python_mapper.py -input /user/hadoop/launchidlworker/input/1 -output /user/hadoop/launchidlworker/output/out1 -numReduceTasks 0 ssh -o StrictHostKeyChecking =否-i hadoop @ hadoop jar /home/hadoop/contrib/streaming/hadoop-streaming.jar-文件​​CODE-文件CODE / congfiguration.conf -mapper CODE / python_mapper.py -input / user / hadoop / launchidlworker / input / 1-输出/ user / hadoop / launchidlworker / output / out1 -numReduceTasks 0

Can you please try stopping all the daemons using 'stop-all' first and then rerun your MR job after restarting the daemons (using 'start-all')? 您能否先尝试使用“ stop-all”停止所有守护程序,然后在重新启动守护程序(使用“ start-all”)之后重新运行MR作业?

Lets see if it helps! 让我们看看是否有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM