xiangqiao123 commented on a change in pull request #18023:
URL: https://github.com/apache/flink/pull/18023#discussion_r769298509



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionJobVertex.java
##########
@@ -307,13 +323,21 @@ public JobVertexID getJobVertexId() {
 
     @Override
     public ExecutionVertex[] getTaskVertices() {
+        if (taskVertices == null) {
+            LOG.warn(
+                    "Trying to get execution vertices of an uninitialized job 
vertex "
+                            + getJobVertexId());
+            return new ExecutionVertex[0];
+        }
         return taskVertices;
     }
 
     public IntermediateResult[] getProducedDataSets() {
+        checkState(isInitialized());
         return producedDataSets;
     }
 
+    @Nullable
     public InputSplitAssigner getSplitAssigner() {
         return splitAssigner;

Review comment:
       Why not use checkState(isInitialized()); to check whether 
ExecutionJobVertex is initialized?




-- 
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]


Reply via email to