huwh commented on code in PR #21612:
URL: https://github.com/apache/flink/pull/21612#discussion_r1067805999
##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SsgNetworkMemoryCalculationUtils.java:
##########
@@ -93,28 +93,27 @@ public static void enrichNetworkMemory(
private static TaskInputsOutputsDescriptor
buildTaskInputsOutputsDescriptor(
ExecutionJobVertex ejv, Function<JobVertexID, ExecutionJobVertex>
ejvs) {
- Map<IntermediateDataSetID, Integer> maxInputChannelNums;
- Map<IntermediateDataSetID, Integer> maxSubpartitionNums;
+ Map<IntermediateDataSetID, Integer> maxInputChannelNums = new
HashMap<>();
Review Comment:
It's a bit weird that the getXXX function returns void but fulfills these
info to the argument passed in. How about adding something like:
```
TaskInputsInfo
int maxInputChannelNums
TaskOutputsInfo
int maxSubpartitionNums;
ResultPartitionType partitionType;
```
Then let getMaxInputChannelNums/getMaxSubpartitionNums return
`Map<IntermediateDataSetID, TaskInputsInfo/TaskOutputsInfo>`. And the name may
need to be changed to getTaskInputsInfo/getOutputsInfo.
In this way, we could add inputPartitionTypes to TaskInputsInfo in the
future.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]