Interface OperatorCoordinator.Context
-
- Enclosing interface:
- OperatorCoordinator
public static interface OperatorCoordinator.Context
The context gives the OperatorCoordinator access to contextual information and provides a gateway to interact with other components, such as sending operator events.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
currentParallelism()
Gets the current parallelism with which this operator is executed.void
failJob(Throwable cause)
Fails the job and trigger a global failover operation.CheckpointCoordinator
getCheckpointCoordinator()
Gets the checkpoint coordinator of this job.CoordinatorStore
getCoordinatorStore()
Gets theCoordinatorStore
instance for sharing information betweenOperatorCoordinator
s.JobID
getJobID()
Gets theJobID
of the job to which the coordinator belongs.OperatorID
getOperatorId()
Gets the ID of the operator to which the coordinator belongs.ClassLoader
getUserCodeClassloader()
Gets the classloader that contains the additional dependencies, which are not part of the JVM's classpath.boolean
isConcurrentExecutionAttemptsSupported()
Gets that whether the coordinator supports an execution vertex to have multiple concurrent running execution attempts.OperatorCoordinatorMetricGroup
metricGroup()
Gets the metric group of the operator coordinator.
-
-
-
Method Detail
-
getOperatorId
OperatorID getOperatorId()
Gets the ID of the operator to which the coordinator belongs.
-
metricGroup
OperatorCoordinatorMetricGroup metricGroup()
Gets the metric group of the operator coordinator.
-
failJob
void failJob(Throwable cause)
Fails the job and trigger a global failover operation.This operation restores the entire job to the latest complete checkpoint. This is useful to recover from inconsistent situations (the view from the coordinator and its subtasks as diverged), but is expensive and should be used with care.
-
currentParallelism
int currentParallelism()
Gets the current parallelism with which this operator is executed.
-
getUserCodeClassloader
ClassLoader getUserCodeClassloader()
Gets the classloader that contains the additional dependencies, which are not part of the JVM's classpath.
-
getCoordinatorStore
CoordinatorStore getCoordinatorStore()
Gets theCoordinatorStore
instance for sharing information betweenOperatorCoordinator
s.
-
isConcurrentExecutionAttemptsSupported
boolean isConcurrentExecutionAttemptsSupported()
Gets that whether the coordinator supports an execution vertex to have multiple concurrent running execution attempts.
-
getCheckpointCoordinator
@Nullable CheckpointCoordinator getCheckpointCoordinator()
Gets the checkpoint coordinator of this job. Return null if checkpoint is disabled.
-
-