Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/hadoop/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为Pail Tap Hadoop作业中的输入指定多个文件夹_Hadoop_Input_Mapreduce_Hdfs_Bigdata - Fatal编程技术网

为Pail Tap Hadoop作业中的输入指定多个文件夹

为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()); 我可以给同一个作业分配多个文件

我正在使用Cascalog API运行hadoop mapreduce作业。我希望使用多个输入文件夹来处理map reduce作业

我在HDFS rooPath/Folder_1和rootPath/Folder_2中有两个文件夹,其中包含要在作业中处理的文件

我通过桶点击功能为作业提供输入文件夹:

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 + "*");