File inputFile = new File(inputPath);
if (inputFile.exists()) {
throw new CascadingException("Input file " + inputPath + " already exists.");
}
Tap inputTap = new Hfs(new SequenceFile(fields), inputPath, SinkMode.REPLACE);
TupleEntryCollector collector = inputTap.openForWrite(getJobConf());
return collector;
}
/**
* Create and run a cascading flow that connects the given pipe to an input