Ok. So I've tried this. I get an exception when I run in local mode.
Here's the snippet of code. The try/catch removed for brevity.
if(flowProcess instanceof HadoopFlowProcess) {
cncFile = createGlobbyInput(RuleCNCBenePercent.BAD_BENE, path);
} else {
cncFile = new Lfs(new cascading.scheme.local.TextDelimited(RuleCNCBenePercent.BAD_BENE), path);
}
final TupleEntryIterator openTapForRead = flowProcess.openTapForRead(cncFile);
I watched the flow using debug. We go into the else branch. An Lfs gets created. We then try to open the tap.
ERROR c.flow.local.planner.LocalStepRunner - unable to prepare operation graph
java.lang.ClassCastException: java.util.Properties cannot be cast to org.apache.hadoop.mapred.JobConf
at cascading.tap.hadoop.io.MultiRecordReaderIterator.<init>(MultiRecordReaderIterator.java:78) ~[cascading-hadoop-2.0.5.jar:na]
at cascading.tap.hadoop.io.HadoopTupleEntrySchemeIterator.makeIterator(HadoopTupleEntrySchemeIterator.java:57) ~[cascading-hadoop-2.0.5.jar:na]
at cascading.tap.hadoop.io.HadoopTupleEntrySchemeIterator.<init>(HadoopTupleEntrySchemeIterator.java:44) ~[cascading-hadoop-2.0.5.jar:na]
at cascading.tap.hadoop.Hfs.openForRead(Hfs.java:405) ~[cascading-hadoop-2.0.5.jar:na]
at cascading.tap.hadoop.Hfs.openForRead(Hfs.java:78) ~[cascading-hadoop-2.0.5.jar:na]
at cascading.tap.Tap.openForRead(Tap.java:262) ~[cascading-core-2.0.5.jar:na]
I'm not really sure why the code switch to Hfs.
This code is running in the prepare method of a buffer.