* @throws IOException
* @throws InterruptedException
*/
public void waitForInputReady() throws IOException, InterruptedException, TezException {
// Cannot synchronize entire method since this is called form user code and can block.
Shuffle localShuffleCopy = null;
synchronized (this) {
Preconditions.checkState(isStarted.get(), "Must start input before invoking this method");
if (getNumPhysicalInputs() == 0) {
return;
}
localShuffleCopy = shuffle;
}
TezRawKeyValueIterator localRawIter = localShuffleCopy.waitForInput();
synchronized(this) {
rawIter = localRawIter;
createValuesIterator();
}
}