public KeyValuesInputMerger(List<? extends Input> shuffleInputs) throws Exception { //get KeyValuesReaders from the LogicalInput and add them to priority queue int initialCapacity = shuffleInputs.size(); kvsIterable = new KeyValuesIterable(initialCapacity); pQueue = new PriorityQueue<KeyValuesReader>(initialCapacity, new KVReaderComparator()); for(Input input : shuffleInputs){ addToQueue((KeyValuesReader)input.getReader()); } }
public KeyValuesInputMerger(List<? extends Input> shuffleInputs) throws Exception { //get KeyValuesReaders from the LogicalInput and add them to priority queue int initialCapacity = shuffleInputs.size(); kvsIterable = new KeyValuesIterable(initialCapacity); pQueue = new PriorityQueue<KeyValuesReader>(initialCapacity, new KVReaderComparator()); for(Input input : shuffleInputs){ addToQueue((KeyValuesReader)input.getReader()); } }
public KeyValuesInputMerger(List<? extends Input> shuffleInputs) throws Exception { //get KeyValuesReaders from the LogicalInput and add them to priority queue int initialCapacity = shuffleInputs.size(); kvsIterable = new KeyValuesIterable(initialCapacity); pQueue = new PriorityQueue<KeyValuesReader>(initialCapacity, new KVReaderComparator()); for(Input input : shuffleInputs){ addToQueue((KeyValuesReader)input.getReader()); } }