Interface OperatorCoordinator.Context
-
- Enclosing interface:
- OperatorCoordinator
public static interface OperatorCoordinator.ContextThe 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 intcurrentParallelism()Gets the current parallelism with which this operator is executed.voidfailJob(Throwable cause)Fails the job and trigger a global failover operation.CheckpointCoordinatorgetCheckpointCoordinator()Gets the checkpoint coordinator of this job.CoordinatorStoregetCoordinatorStore()Gets theCoordinatorStoreinstance for sharing information betweenOperatorCoordinators.org.apache.flink.api.common.JobIDgetJobID()Gets theJobIDof the job to which the coordinator belongs.OperatorIDgetOperatorId()Gets the ID of the operator to which the coordinator belongs.ClassLoadergetUserCodeClassloader()Gets the classloader that contains the additional dependencies, which are not part of the JVM's classpath.booleanisConcurrentExecutionAttemptsSupported()Gets that whether the coordinator supports an execution vertex to have multiple concurrent running execution attempts.org.apache.flink.metrics.groups.OperatorCoordinatorMetricGroupmetricGroup()Gets the metric group of the operator coordinator.
-
-
-
Method Detail
-
getJobID
org.apache.flink.api.common.JobID getJobID()
Gets theJobIDof the job to which the coordinator belongs.
-
getOperatorId
OperatorID getOperatorId()
Gets the ID of the operator to which the coordinator belongs.
-
metricGroup
org.apache.flink.metrics.groups.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 theCoordinatorStoreinstance for sharing information betweenOperatorCoordinators.
-
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.
-
-