ArrayListMultimap.<Integer, InputSplit>create(bucketToInitialSplitMap);
Map<Integer, Collection<InputSplit>> bucketSplitMap = bucketToInitialSplitMap.asMap();
for (int bucketId : bucketSplitMap.keySet()) {
Collection<InputSplit>inputSplitCollection = bucketSplitMap.get(bucketId);
TezMapredSplitsGrouper grouper = new TezMapredSplitsGrouper();
InputSplit[] groupedSplits = grouper.getGroupedSplits(conf,
inputSplitCollection.toArray(new InputSplit[0]), bucketToNumTaskMap.get(bucketId),
HiveInputFormat.class.getName());
LOG.info("Original split size is " +
inputSplitCollection.toArray(new InputSplit[0]).length +
" grouped split size is " + groupedSplits.length);