Interface TaskManagerGateway

    • Method Detail

      • getAddress

        String getAddress()
        Return the address of the task manager with which the gateway is associated.
        Returns:
        Address of the task manager with which this gateway is associated.
      • cancelTask

        CompletableFuture<Acknowledge> cancelTask​(ExecutionAttemptID executionAttemptID,
                                                  Duration timeout)
        Cancel the given task.
        Parameters:
        executionAttemptID - identifying the task
        timeout - of the submit operation
        Returns:
        Future acknowledge if the task is successfully canceled
      • updatePartitions

        CompletableFuture<Acknowledge> updatePartitions​(ExecutionAttemptID executionAttemptID,
                                                        Iterable<PartitionInfo> partitionInfos,
                                                        Duration timeout)
        Update the task where the given partitions can be found.
        Parameters:
        executionAttemptID - identifying the task
        partitionInfos - telling where the partition can be retrieved from
        timeout - of the submit operation
        Returns:
        Future acknowledge if the partitions have been successfully updated
      • releasePartitions

        void releasePartitions​(JobID jobId,
                               Set<ResultPartitionID> partitionIds)
        Batch release intermediate result partitions.
        Parameters:
        jobId - id of the job that the partitions belong to
        partitionIds - partition ids to release
      • notifyCheckpointOnComplete

        void notifyCheckpointOnComplete​(ExecutionAttemptID executionAttemptID,
                                        JobID jobId,
                                        long completedCheckpointId,
                                        long completedTimestamp,
                                        long lastSubsumedCheckpointId)
        Notify the given task about a completed checkpoint and the last subsumed checkpoint id if possible.
        Parameters:
        executionAttemptID - identifying the task
        jobId - identifying the job to which the task belongs
        completedCheckpointId - of the completed checkpoint
        completedTimestamp - of the completed checkpoint
        lastSubsumedCheckpointId - of the last subsumed checkpoint id,
      • notifyCheckpointAborted

        void notifyCheckpointAborted​(ExecutionAttemptID executionAttemptID,
                                     JobID jobId,
                                     long checkpointId,
                                     long latestCompletedCheckpointId,
                                     long timestamp)
        Notify the given task about a aborted checkpoint.
        Parameters:
        executionAttemptID - identifying the task
        jobId - identifying the job to which the task belongs
        checkpointId - of the subsumed checkpoint
        latestCompletedCheckpointId - of the latest completed checkpoint
        timestamp - of the subsumed checkpoint
      • triggerCheckpoint

        CompletableFuture<Acknowledge> triggerCheckpoint​(ExecutionAttemptID executionAttemptID,
                                                         JobID jobId,
                                                         long checkpointId,
                                                         long timestamp,
                                                         CheckpointOptions checkpointOptions)
        Trigger for the given task a checkpoint.
        Parameters:
        executionAttemptID - identifying the task
        jobId - identifying the job to which the task belongs
        checkpointId - of the checkpoint to trigger
        timestamp - of the checkpoint to trigger
        checkpointOptions - of the checkpoint to trigger
        Returns:
        Future acknowledge which is returned once the checkpoint has been triggered
      • freeSlot

        CompletableFuture<Acknowledge> freeSlot​(AllocationID allocationId,
                                                Throwable cause,
                                                Duration timeout)
        Frees the slot with the given allocation ID.
        Parameters:
        allocationId - identifying the slot to free
        cause - of the freeing operation
        timeout - for the operation
        Returns:
        Future acknowledge which is returned once the slot has been freed