zhijiangW commented on a change in pull request #8362: [FLINK-11391] Introduce
shuffle master interface
URL: https://github.com/apache/flink/pull/8362#discussion_r282791458
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/deployment/ResultPartitionDeploymentDescriptor.java
##########
@@ -39,61 +38,51 @@
private static final long serialVersionUID = 6343547936086963705L;
- /** The ID of the result this partition belongs to. */
- private final IntermediateDataSetID resultId;
-
- /** The ID of the partition. */
- private final IntermediateResultPartitionID partitionId;
-
- /** The type of the partition. */
- private final ResultPartitionType partitionType;
-
- /** The number of subpartitions. */
- private final int numberOfSubpartitions;
+ @Nonnull
+ private final PartitionShuffleDescriptor partitionShuffleDescriptor;
- /** The maximum parallelism. */
- private final int maxParallelism;
+ @Nonnull
+ private final ShuffleDeploymentDescriptor shuffleDeploymentDescriptor;
/** Flag whether the result partition should send
scheduleOrUpdateConsumer messages. */
private final boolean sendScheduleOrUpdateConsumersMessage;
public ResultPartitionDeploymentDescriptor(
- IntermediateDataSetID resultId,
- IntermediateResultPartitionID partitionId,
- ResultPartitionType partitionType,
- int numberOfSubpartitions,
- int maxParallelism,
- boolean lazyScheduling) {
-
- this.resultId = checkNotNull(resultId);
- this.partitionId = checkNotNull(partitionId);
- this.partitionType = checkNotNull(partitionType);
-
-
KeyGroupRangeAssignment.checkParallelismPreconditions(maxParallelism);
- checkArgument(numberOfSubpartitions >= 1);
- this.numberOfSubpartitions = numberOfSubpartitions;
- this.maxParallelism = maxParallelism;
- this.sendScheduleOrUpdateConsumersMessage = lazyScheduling;
+ @Nonnull PartitionShuffleDescriptor partitionShuffleDescriptor,
+ @Nonnull ShuffleDeploymentDescriptor
shuffleDeploymentDescriptor,
+ boolean sendScheduleOrUpdateConsumersMessage) {
+
+ this.partitionShuffleDescriptor = partitionShuffleDescriptor;
+ this.shuffleDeploymentDescriptor = shuffleDeploymentDescriptor;
+ this.sendScheduleOrUpdateConsumersMessage =
sendScheduleOrUpdateConsumersMessage;
}
+ @Nonnull
public IntermediateDataSetID getResultId() {
- return resultId;
+ return partitionShuffleDescriptor.getResultId();
}
+ @Nonnull
public IntermediateResultPartitionID getPartitionId() {
- return partitionId;
+ return partitionShuffleDescriptor.getPartitionId();
}
+ @Nonnull
public ResultPartitionType getPartitionType() {
- return partitionType;
+ return partitionShuffleDescriptor.getPartitionType();
}
public int getNumberOfSubpartitions() {
- return numberOfSubpartitions;
+ return partitionShuffleDescriptor.getNumberOfSubpartitions();
}
public int getMaxParallelism() {
- return maxParallelism;
+ return partitionShuffleDescriptor.getMaxParallelism();
+ }
+
+ @Nonnull
+ public ShuffleDeploymentDescriptor getShuffleDeploymentDescriptor() {
Review comment:
package private
----------------------------------------------------------------
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