// if the execution is against Mapred DFS, set
// working dir to /user/<userid>
if(pigContext.getExecType() == ExecType.MAPREDUCE)
fs.setWorkingDirectory(new Path("/user", job.getUser()));
DataStorage store = new HDataStorage(ConfigurationUtil.toProperties(job));
ValidatingInputFileSpec spec;
if (inputs.get(i).first instanceof ValidatingInputFileSpec) {
spec = (ValidatingInputFileSpec) inputs.get(i).first;
} else {
spec = new ValidatingInputFileSpec(inputs.get(i).first, store);