liyafan82 commented on a change in pull request #8934: [FLINK-12628][Runtime /
Coordination] Check test failure if partitionhas no consumers in
Execution.getPartitionMaxParallelism
URL: https://github.com/apache/flink/pull/8934#discussion_r299282016
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java
##########
@@ -679,14 +678,10 @@ public void setInitialState(@Nullable
JobManagerTaskRestore taskRestore) {
}
private static int
getPartitionMaxParallelism(IntermediateResultPartition partition) {
- // TODO consumers.isEmpty() only exists for test, currently
there has to be exactly one consumer in real jobs!
final List<List<ExecutionEdge>> consumers =
partition.getConsumers();
- int maxParallelism =
KeyGroupRangeAssignment.UPPER_BOUND_MAX_PARALLELISM;
- if (!consumers.isEmpty()) {
- List<ExecutionEdge> consumer = consumers.get(0);
- ExecutionJobVertex consumerVertex =
consumer.get(0).getTarget().getJobVertex();
- maxParallelism = consumerVertex.getMaxParallelism();
- }
+ List<ExecutionEdge> consumer = consumers.get(0);
Review comment:
Maybe not. In my local environment, no exception was thrown when we ignore
the case for the consumer being empty. Let's see if we can reproduce it in
Travis.
----------------------------------------------------------------
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