Jiabao-Sun commented on PR #23876:
URL: https://github.com/apache/flink/pull/23876#issuecomment-1851693843

   Thanks @pvary for the effort.
   
   I still have a question whether it is necessary for `CommitterInitContext` 
to inherit `InitContext`. `CommitterInitContext` seems to be independent and 
only used for creating `Committer`. Can we make it not inherit any interface 
and still meet the requirements?
   
   ```java
       /** The interface exposes some runtime info for creating a {@link 
Committer}. */
       @PublicEvolving
       interface CommitterInitContext {
   
           /** @return The id of task where the committer is running. */
           int getSubtaskId();
   
           /** @return The number of parallel committer tasks. */
           int getNumberOfParallelSubtasks();
   
           /**
            * Gets the attempt number of this parallel subtask. First attempt 
is numbered 0.
            *
            * @return Attempt number of the subtask.
            */
           int getAttemptNumber();
   
           /**
            * Returns id of the restored checkpoint, if state was restored from 
the snapshot of a previous
            * execution.
            */
           OptionalLong getRestoredCheckpointId();
   
           /**
            * The ID of the current job. Note that Job ID can change in 
particular upon manual restart. The
            * returned ID should NOT be used for any job management tasks.
            */
           JobID getJobId();
   
           /** @return The metric group this committer belongs to. */
           SinkCommitterMetricGroup metricGroup();
       }
   ```
   
   The compatibility issue for `WriteInitContext` comes from this abstraction. 
   Is it possible for us to abandon the abstraction of `InitContext` at the 
current stage and make further modifications in version 2.0?


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