boolean markFinished() { // Sanity check that this is only called on blocking partitions. if (!getResultType().isBlocking()) { throw new IllegalStateException("Tried to mark a non-blocking result partition as finished"); } final int refCnt = totalResult.decrementNumberOfRunningProducersAndGetRemaining(); if (refCnt == 0) { return true; } else if (refCnt < 0) { throw new IllegalStateException("Decremented number of unfinished producers below 0. " + "This is most likely a bug in the execution state/intermediate result " + "partition management."); } return false; } }
boolean markFinished() { // Sanity check that this is only called on blocking partitions. if (!getResultType().isBlocking()) { throw new IllegalStateException("Tried to mark a non-blocking result partition as finished"); } final int refCnt = totalResult.decrementNumberOfRunningProducersAndGetRemaining(); if (refCnt == 0) { return true; } else if (refCnt < 0) { throw new IllegalStateException("Decremented number of unfinished producers below 0. " + "This is most likely a bug in the execution state/intermediate result " + "partition management."); } return false; } }
boolean markFinished() { // Sanity check that this is only called on blocking partitions. if (!getResultType().isBlocking()) { throw new IllegalStateException("Tried to mark a non-blocking result partition as finished"); } final int refCnt = totalResult.decrementNumberOfRunningProducersAndGetRemaining(); if (refCnt == 0) { return true; } else if (refCnt < 0) { throw new IllegalStateException("Decremented number of unfinished producers below 0. " + "This is most likely a bug in the execution state/intermediate result " + "partition management."); } return false; } }