Search in sources :

Example 26 with TaskManagerGateway

use of org.apache.flink.runtime.jobmanager.slots.TaskManagerGateway in project flink by apache.

the class Execution method triggerCheckpointHelper.

private CompletableFuture<Acknowledge> triggerCheckpointHelper(long checkpointId, long timestamp, CheckpointOptions checkpointOptions) {
    final LogicalSlot slot = assignedResource;
    if (slot != null) {
        final TaskManagerGateway taskManagerGateway = slot.getTaskManagerGateway();
        return taskManagerGateway.triggerCheckpoint(attemptId, getVertex().getJobId(), checkpointId, timestamp, checkpointOptions);
    }
    LOG.debug("The execution has no slot assigned. This indicates that the execution is no longer running.");
    return CompletableFuture.completedFuture(Acknowledge.get());
}
Also used : TaskManagerGateway(org.apache.flink.runtime.jobmanager.slots.TaskManagerGateway) LogicalSlot(org.apache.flink.runtime.jobmaster.LogicalSlot)

Aggregations

TaskManagerGateway (org.apache.flink.runtime.jobmanager.slots.TaskManagerGateway)26 SimpleSlot (org.apache.flink.runtime.instance.SimpleSlot)12 FlinkCompletableFuture (org.apache.flink.runtime.concurrent.impl.FlinkCompletableFuture)10 Test (org.junit.Test)10 JobID (org.apache.flink.api.common.JobID)9 TaskDeploymentDescriptor (org.apache.flink.runtime.deployment.TaskDeploymentDescriptor)8 JobGraph (org.apache.flink.runtime.jobgraph.JobGraph)8 JobVertex (org.apache.flink.runtime.jobgraph.JobVertex)8 Time (org.apache.flink.api.common.time.Time)7 AllocatedSlot (org.apache.flink.runtime.jobmanager.slots.AllocatedSlot)7 JobException (org.apache.flink.runtime.JobException)6 LogicalSlot (org.apache.flink.runtime.jobmaster.LogicalSlot)6 TimeoutException (java.util.concurrent.TimeoutException)5 Slot (org.apache.flink.runtime.instance.Slot)5 Acknowledge (org.apache.flink.runtime.messages.Acknowledge)5 ResourceID (org.apache.flink.runtime.clusterframework.types.ResourceID)4 Future (org.apache.flink.runtime.concurrent.Future)4 SlotOwner (org.apache.flink.runtime.jobmanager.slots.SlotOwner)4 TaskManagerLocation (org.apache.flink.runtime.taskmanager.TaskManagerLocation)4 ArrayList (java.util.ArrayList)3