如何为map reduce指定通用输入路径。
文件夹结构示例如下:
folderA/folderB/folderC/mainfolder/date/day/data files
有许多日期文件夹和许多天文件夹。
我想深入到一个特定范围的日期文件夹文件夹,然后拿起特定范围的数据文件。如果我尝试
'folderA/folderB/folderC/mainfolder/*/*'
这将读取所有文件。我想为文件夹指定一个日期范围,即读取13-06-01和13-06-25中的所有文件,并忽略所有其他日期文件夹。我该怎么做?
1条答案
按热度按时间vjhs03f71#
如果你提供
作为一个输入,如果要过滤掉特定的路径,您可能需要创建一个自定义的pathfilter
在fileinputformat中有这个函数-
例如。
像这样注册路径过滤器-