public static interface OperatorCoordinator.Context
Modifier and Type | Method and 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.
|
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.
|
CompletableFuture<Acknowledge> |
sendEvent(OperatorEvent evt,
int targetSubtask)
Sends an event to the parallel subtask with the given subtask index.
|
OperatorID getOperatorId()
CompletableFuture<Acknowledge> sendEvent(OperatorEvent evt, int targetSubtask) throws TaskNotRunningException
The returned future is completed successfully once the event has been received by the target TaskManager. The future is completed exceptionally if the event cannot be sent. That includes situations where the target task is not running.
TaskNotRunningException
void failJob(Throwable cause)
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.
int currentParallelism()
ClassLoader getUserCodeClassloader()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.