in datafu-hourglass/src/main/java/datafu/hourglass/jobs/StagedOutputJob.java [82:123]
public static StagedOutputJob createStagedJob(
Configuration conf,
String jobName,
List<String> inputPaths,
String stagingLocation,
String outputPath,
final Logger log)
{
final StagedOutputJob retVal;
try
{
retVal = new StagedOutputJob(conf, stagingLocation, log);
retVal.setJobName(jobName);
retVal.setJarByClass(getCallersClass());
FileInputFormat.setInputPathFilter(retVal, HiddenFilePathFilter.class);
}
catch (IOException e)
{
log.error("IOException when making a job", e);
throw new RuntimeException(e);
}
if (inputPaths != null)
{
try
{
FileInputFormat.setInputPaths(
retVal,
StringUtils.join(inputPaths.iterator(),",")
);
}
catch (IOException e)
{
log.error("Unable to set up input paths.", e);
throw new RuntimeException(e);
}
}
FileOutputFormat.setOutputPath(retVal, new Path(outputPath));
return retVal;
}