inputs.add(new Pair<FileSpec, Boolean>(fs, true));
Properties p = UDFContext.getUDFContext().getUDFProperties(SampleLoader.class);
p.setProperty("pig.input.0.size", Long.toString(Util.getSize(cluster, INPUT_FILE1)));
// Use 100 as a default value;
PoissonSampleLoader ps = new PoissonSampleLoader((new FuncSpec(PigStorage.class.getName())).toString(), "100");
// Get the number of samples for the file
ps.computeSamples(inputs, pigServer.getPigContext());
if (ps.getNumSamples() != 3) {
fail("Compute samples returned the wrong number of samples: " + ps.getNumSamples() + " instead of 3");
}
}