You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2020/02/05 19:17:15 UTC
[flink] 02/04: [hotfix][runtime] Clean up minor issues in
TaskInformation
This is an automated email from the ASF dual-hosted git repository.
sewen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit d8f041829f52869dc408030ab3456719f01626c9
Author: Stephan Ewen <se...@apache.org>
AuthorDate: Wed Feb 5 12:46:43 2020 +0100
[hotfix][runtime] Clean up minor issues in TaskInformation
- Checkstyle violations in JavaDocs
- Remove use of 'checkNotNull' on primitive types, which looks like a confusion/oversight.
It is not checking anything and results in unnecessary boxing/unboxing.
---
.../flink/runtime/executiongraph/TaskInformation.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/TaskInformation.java b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/TaskInformation.java
index 9dc9a04..6410e6b 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/TaskInformation.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/TaskInformation.java
@@ -32,22 +32,22 @@ public class TaskInformation implements Serializable {
private static final long serialVersionUID = -9006218793155953789L;
- /** Job vertex id of the associated job vertex */
+ /** Job vertex id of the associated job vertex. */
private final JobVertexID jobVertexId;
- /** Name of the task */
+ /** Name of the task. */
private final String taskName;
- /** The number of subtasks for this operator */
+ /** The number of subtasks for this operator. */
private final int numberOfSubtasks;
- /** The maximum parallelism == number of key groups */
+ /** The maximum parallelism == number of key groups. */
private final int maxNumberOfSubtasks;
- /** Class name of the invokable to run */
+ /** Class name of the invokable to run. */
private final String invokableClassName;
- /** Configuration for the task */
+ /** Configuration for the task. */
private final Configuration taskConfiguration;
public TaskInformation(
@@ -59,8 +59,8 @@ public class TaskInformation implements Serializable {
Configuration taskConfiguration) {
this.jobVertexId = Preconditions.checkNotNull(jobVertexId);
this.taskName = Preconditions.checkNotNull(taskName);
- this.numberOfSubtasks = Preconditions.checkNotNull(numberOfSubtasks);
- this.maxNumberOfSubtasks = Preconditions.checkNotNull(maxNumberOfSubtasks);
+ this.numberOfSubtasks = numberOfSubtasks;
+ this.maxNumberOfSubtasks = maxNumberOfSubtasks;
this.invokableClassName = Preconditions.checkNotNull(invokableClassName);
this.taskConfiguration = Preconditions.checkNotNull(taskConfiguration);
}