Interface InitContext
-
- All Known Subinterfaces:
CommitterInitContext,Sink.InitContext,WriterInitContext
- All Known Implementing Classes:
Sink.InitContextWrapper
@Internal public interface InitContextCommon interface which exposes runtime info for creatingSinkWriterandCommitterobjects.
-
-
Field Summary
Fields Modifier and Type Field Description static longINITIAL_CHECKPOINT_IDThe first checkpoint id when an application is started and not recovered from a previously taken checkpoint or savepoint.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default intgetAttemptNumber()Deprecated.This method is deprecated since Flink 1.19.default JobIDgetJobId()Deprecated.This method is deprecated since Flink 1.19.JobInfogetJobInfo()Get the meta information of current job.default intgetNumberOfParallelSubtasks()Deprecated.This method is deprecated since Flink 1.19.OptionalLonggetRestoredCheckpointId()Returns id of the restored checkpoint, if state was restored from the snapshot of a previous execution.default intgetSubtaskId()Deprecated.This method is deprecated since Flink 1.19.TaskInfogetTaskInfo()Get the meta information of current task.
-
-
-
Field Detail
-
INITIAL_CHECKPOINT_ID
static final long INITIAL_CHECKPOINT_ID
The first checkpoint id when an application is started and not recovered from a previously taken checkpoint or savepoint.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSubtaskId
@Deprecated default int getSubtaskId()
Deprecated.This method is deprecated since Flink 1.19. All metadata about the task should be provided uniformly bygetTaskInfo().Get the id of task where the committer is running.
-
getNumberOfParallelSubtasks
@Deprecated default int getNumberOfParallelSubtasks()
Deprecated.This method is deprecated since Flink 1.19. All metadata about the task should be provided uniformly bygetTaskInfo().Get the number of parallel committer tasks.
-
getAttemptNumber
@Deprecated default int getAttemptNumber()
Deprecated.This method is deprecated since Flink 1.19. All metadata about the task should be provided uniformly bygetTaskInfo().Gets the attempt number of this parallel subtask. First attempt is numbered 0.- Returns:
- Attempt number of the subtask.
- See Also:
- FLIP-382: Unify the Provision of Diverse Metadata for Context-like APIs
-
getRestoredCheckpointId
OptionalLong getRestoredCheckpointId()
Returns id of the restored checkpoint, if state was restored from the snapshot of a previous execution.
-
getJobId
@Deprecated default JobID getJobId()
Deprecated.This method is deprecated since Flink 1.19. All metadata about the job should be provided uniformly bygetJobInfo().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.
-
getJobInfo
@PublicEvolving JobInfo getJobInfo()
Get the meta information of current job.- Returns:
- the job meta information.
-
getTaskInfo
@PublicEvolving TaskInfo getTaskInfo()
Get the meta information of current task.- Returns:
- the task meta information.
-
-