zhuzhurk commented on code in PR #19747:
URL: https://github.com/apache/flink/pull/19747#discussion_r875516319


##########
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionAttemptID.java:
##########
@@ -48,11 +47,6 @@ public class ExecutionAttemptID implements 
java.io.Serializable {
 
     private final int attemptNumber;
 
-    @VisibleForTesting
-    public ExecutionAttemptID() {

Review Comment:
   My major concern is someone may use it without knowing a mocked 
`jobVertexId`, `subtaskIndex` and `attemptNumber` is used which may be 
inconsistent of the fact.
   This method is seldom used in production and only used as a placeholder. How 
about adding a `ExecutionAttemptID #createDummyExecutionAttemptID()` method to 
explicitly show that it is a dummy one? It can be used in production.
   For testing cases, I prefer to keep the factory methods in 
`ExecutionGraphTestUtils` to avoid messing up production code for testing 
purpose.
   WDYT?



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