Apache Crunch: How to set multiple input paths?

86 Views Asked by At

I have a problem: I can't set the multiple input paths when I use the Apache Crunch. How can I solve this problem?

1

There are 1 best solutions below

1
Ravibhushan Kumar On

you can add the multiple input files to crunch by specifying all the input paths in a List.

public class Name {

public static void main(String[] args) {
    Pipeline pipeline =  new MRPipeline(Name.class, jobName, conf);
    List<Path> inputPathList = new ArrayList<>(); // Add your InputPaths here
    PCollection<String> source = From.sequenceFile(inputPathList, Text.class);
  }
}