azagrebin commented on a change in pull request #8529: [FLINK-12603][network]
Refactor InputGate interface to remove unnecessary methods
URL: https://github.com/apache/flink/pull/8529#discussion_r288212692
##########
File path: flink-core/src/main/java/org/apache/flink/api/common/TaskInfo.java
##########
@@ -67,11 +72,12 @@ public TaskInfo(
checkArgument(indexOfSubtask < numberOfParallelSubtasks, "Task
index must be less than parallelism.");
checkArgument(attemptNumber >= 0, "Attempt number must be a
non-negative number.");
this.taskName = checkNotNull(taskName, "Task Name must not be
null.");
+ this.taskNameWithSubtasks = checkNotNull(taskNameWithSubtasks);
+ this.taskNameWithSubtaskAndId =
checkNotNull(taskNameWithSubtaskAndId);
this.maxNumberOfParallelSubtasks = maxNumberOfParallelSubtasks;
this.indexOfSubtask = indexOfSubtask;
this.numberOfParallelSubtasks = numberOfParallelSubtasks;
this.attemptNumber = attemptNumber;
- this.taskNameWithSubtasks = taskName + " (" + (indexOfSubtask +
1) + '/' + numberOfParallelSubtasks + ')';
Review comment:
Unless we introduce at least a static factory method `TaskInfo.create(...)`,
I would keep these internal task name creation inside `TaskInfo` otherwise
Task constructor contains too many details. The same for
`taskNameWithSubtaskAndId`, I would rather pass the `executionAttemptID` to
`TaskInfo` constructor or again add a factory method with these details.
----------------------------------------------------------------
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