Hadoop Non-splittable TextInputFormat

百般思念 提交于 2019-12-05 10:33:32

问题


Is there a way to have a whole file sent to a mapper without being split?

I have read this but I am wondering if there is another way of doing the same thing without having to generate an intermediate file. Ideally, I would like an existing option on the command line to Hadoop.

I am using the streaming facility with Python scripts on Amazon EMR.


回答1:


Just set the configuration property mapred.min.split.size to something huge (10G):

-D mapred.min.split.size=10737418240

Or compress the input file using a codec that isn't splittable (Gzip). With the .gz extension, TextInputFormat will return false to the isSplittable(FileSystem, Path) method



来源:https://stackoverflow.com/questions/10969517/hadoop-non-splittable-textinputformat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!