} catch(Exception ex) {
throw new ParserValidationException( intStream, loc, ex );
}
FileSpec loader = new FileSpec(absolutePath, funcSpec);
LOLoad op = new LOLoad(
loader,
schema,
plan,
ConfigurationUtil.toConfiguration(pigContext.getProperties()),
loFunc,
alias + "_" + newOperatorKey());
op.setTmpLoad(false);
// Check if there's a store in the plan already that this load
// depends on. If so, add it as an input alias
List<String> inputAliases = new ArrayList<String>();
// Get list of stores. The stores are not all sinks in the plan
// if they've already got successors.
Iterator<Operator> itr = plan.getOperators();
List<LOStore> stores = new ArrayList<LOStore>();
while (itr.hasNext()) {
Operator lop = itr.next();
if (lop instanceof LOStore) {
stores.add((LOStore)lop);
}
}
for (LOStore store : stores) {
String ifile = op.getFileSpec().getFileName();
String ofile = store.getFileSpec().getFileName();
if (ofile.equals(ifile)) {
inputAliases.add( store.getAlias() );
}
}