为Pail Tap Hadoop作业中的输入指定多个文件夹
我正在使用Cascalog API运行hadoop mapreduce作业。我希望使用多个输入文件夹来处理map reduce作业 我在HDFS rooPath/Folder_1和rootPath/Folder_2中有两个文件夹,其中包含要在作业中处理的文件 我通过桶点击功能为作业提供输入文件夹:为Pail Tap Hadoop作业中的输入指定多个文件夹,hadoop,input,mapreduce,hdfs,bigdata,Hadoop,Input,Mapreduce,Hdfs,Bigdata,我正在使用Cascalog API运行hadoop mapreduce作业。我希望使用多个输入文件夹来处理map reduce作业 我在HDFS rooPath/Folder_1和rootPath/Folder_2中有两个文件夹,其中包含要在作业中处理的文件 我通过桶点击功能为作业提供输入文件夹: new PailTap(rootPath + "Folder_1", JcascalogUtils.getPailTapOptions()); 我可以给同一个作业分配多个文件
new PailTap(rootPath + "Folder_1",
JcascalogUtils.getPailTapOptions());
我可以给同一个作业分配多个文件夹吗
我可以给出一个类似rootPath+*/的regex fodler路径,以便它处理rootPath文件夹中的所有文件夹
感谢您的帮助:)您可以像这样使用MultiSourceTap:
dataSource = new MultiSourceTap(
new PailTap(rootPath + "Folder_1",JcascalogUtils.getPailTapOptions()),
new PailTap(rootPath + "Folder_2",JcascalogUtils.getPailTapOptions())
);
或者使用GlobHfs
dataSource = new GlobHfs(new PailTap(rootPath,JcascalogUtils.getPailTapOptions()).getScheme() , rootPath + "*");