List<InputSplit> result = pigInputFormat.getPigSplits(rawSplits, 0, ok,
null, true, conf);
Assert.assertEquals(result.size(), 3);
int index = 0;
for (InputSplit split : result) {
PigSplit pigSplit = (PigSplit) split;
int len = pigSplit.getNumPaths();
if (index == 0) {
checkLocations(pigSplit.getLocations(), new String[] {
"l1", "l4", "l5"
});
Assert.assertEquals(1, len);
Assert.assertEquals(800, pigSplit.getLength(0));
}
else if (index == 1) {
checkLocations(pigSplit.getLocations(), new String[] {
"l1", "l2", "l3"
});
Assert.assertEquals(1, len);
Assert.assertEquals(700, pigSplit.getLength(0));
}
else {
checkLocations(pigSplit.getLocations(), new String[] {
"l1", "l2", "l3"
});
Assert.assertEquals(1, len);
Assert.assertEquals(600, pigSplit.getLength(0));
}
index++;
}
}