// Pass loader signature to slicer
List<String> inpSignatureLists = (ArrayList<String>)ObjectSerializer.deserialize(job.get("pig.inpSignatures"));
if (inpSignatureLists.get(i)!=null)
store.getConfiguration().setProperty("pig.loader.signature", inpSignatureLists.get(i));
ValidatingInputFileSpec spec;
if (inputs.get(i).first instanceof ValidatingInputFileSpec) {
spec = (ValidatingInputFileSpec) inputs.get(i).first;
} else {
spec = new ValidatingInputFileSpec(inputs.get(i).first, store);
}
boolean isSplittable = inputs.get(i).second;
if ((spec.getSlicer() instanceof PigSlicer)) {
((PigSlicer)spec.getSlicer()).setSplittable(isSplittable);
}
/* Set the input size in UDF Context if LoadFunc is a sample loader.
* This value is used by PoissonSampleLoader to calculate the number of
* samplable tuples
*/
Object loader = PigContext.instantiateFuncFromSpec(spec.getFuncSpec());
if (loader instanceof SampleLoader) {
Long iSize = FileLocalizer.getSize(spec.getFileName(), pigContext.getProperties());
UDFContext udfc = UDFContext.getUDFContext();
Properties p = udfc.getUDFProperties(SampleLoader.class);
p.setProperty("pig.input." + i + ".size", Long.toString(iSize));
udfc.serialize(job);
}
Slice[] pigs = spec.getSlicer().slice(store, spec.getFileName());
for (Slice split : pigs) {
splits.add(new SliceWrapper(split, pigContext.getExecType(), i, fs, inpTargets.get(i)));
}
} catch (ExecException ee) {
throw ee;