azagrebin commented on a change in pull request #8463: [FLINK-12530][network]
Move Task.inputGatesById to NetworkEnvironment
URL: https://github.com/apache/flink/pull/8463#discussion_r286004596
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/NetworkEnvironment.java
##########
@@ -331,6 +346,24 @@ private void registerInputMetrics(MetricGroup inputGroup,
MetricGroup buffersGro
buffersGroup.gauge(METRIC_INPUT_POOL_USAGE, new
InputBufferPoolUsageGauge(inputGates));
}
+ /**
+ * Update consuming gate with newly available partition.
+ *
+ * @param partitionInfo telling where the partition can be retrieved
from
+ * @throws IOException IO problem by the update
+ * @throws InterruptedException potentially blocking operation was
interrupted
+ * @throws PartitionException the input gate with the id from the
partitionInfo is not found
+ */
+ public void updatePartitionInfo(PartitionInfo partitionInfo)
+ throws IOException, InterruptedException, PartitionException {
+ IntermediateDataSetID intermediateResultPartitionID =
partitionInfo.getIntermediateDataSetID();
+ SingleInputGate inputGate =
inputGatesById.get(intermediateResultPartitionID);
+ if (inputGate == null) {
+ throw new PartitionException("No reader with ID " +
intermediateResultPartitionID + " was found.");
Review comment:
This is how it was reported before.. but I agree `IllegalStateException`
fits better
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services