/** * Returns the ID of the job this allocated slot belongs to. * * @return the ID of the job this allocated slot belongs to */ public JobID getJobID() { return allocatedSlot.getJobID(); }
/** * Gets the actor gateway that can be used to send messages to the TaskManager. * * <p>This method should be removed once the new interface-based RPC abstraction is in place * * @return The actor gateway that can be used to send messages to the TaskManager. */ public TaskManagerGateway getTaskManagerGateway() { return allocatedSlot.getTaskManagerGateway(); }
/** * Creates a new shared slot that has no parent (is a root slot) and does not belong to any task group. * This constructor is used to create a slot directly from an instance. * * @param allocatedSlot The allocated slot that this slot represents. * @param owner The component from which this slot is allocated. * @param assignmentGroup The assignment group that this shared slot belongs to. */ public SharedSlot(AllocatedSlot allocatedSlot, SlotOwner owner, SlotSharingGroupAssignment assignmentGroup) { this(allocatedSlot, owner, allocatedSlot.getSlotNumber(), assignmentGroup, null, null); }
@Override public CompletableFuture<TransientBlobKey> requestTaskManagerLog(Time timeout) { return requestTaskManagerLog((TaskManagerMessages.RequestTaskManagerLog) TaskManagerMessages.getRequestTaskManagerLog(), timeout); }
private void sendFailIntermediateResultPartitionsRpcCall() { final LogicalSlot slot = assignedResource; if (slot != null) { final TaskManagerGateway taskManagerGateway = slot.getTaskManagerGateway(); // TODO For some tests this could be a problem when querying too early if all resources were released taskManagerGateway.failPartition(attemptId); } }
@Override public Future<Acknowledge> call() throws Exception { return taskManagerGateway.cancelTask(attemptId, timeout); } },
@Override public Future<Acknowledge> call() throws Exception { return taskManagerGateway.stopTask(attemptId, timeout); } },
/** * Gets the location info of the TaskManager that offers this slot. * * @return The location info of the TaskManager that offers this slot */ public TaskManagerLocation getTaskManagerLocation() { return allocatedSlot.getTaskManagerLocation(); }
@Override public CompletableFuture<TransientBlobKey> requestTaskManagerLog(Time timeout) { return requestTaskManagerLog((TaskManagerMessages.RequestTaskManagerLog) TaskManagerMessages.getRequestTaskManagerLog(), timeout); }
private void sendFailIntermediateResultPartitionsRpcCall() { final LogicalSlot slot = assignedResource; if (slot != null) { final TaskManagerGateway taskManagerGateway = slot.getTaskManagerGateway(); // TODO For some tests this could be a problem when querying too early if all resources were released taskManagerGateway.failPartition(attemptId); } }
/** * Gets the ID of the TaskManager on which this slot was allocated. * * <p>This is equivalent to {@link #getTaskManagerLocation()#getTaskManagerId()}. * * @return This slot's TaskManager's ID. */ public ResourceID getTaskManagerId() { return getTaskManagerLocation().getResourceID(); }
private SimpleSlot createSimpleSlot(AllocatedSlot slot, Locality locality) { SimpleSlot result = new SimpleSlot(slot, providerAndOwner, slot.getSlotNumber()); if (locality != null) { result.setLocality(locality); } return result; }
@Override public Future<BlobKey> requestTaskManagerLog(Time timeout) { return requestTaskManagerLog((TaskManagerMessages.RequestTaskManagerLog) TaskManagerMessages.getRequestTaskManagerLog(), timeout); }
private void sendFailIntermediateResultPartitionsRpcCall() { final SimpleSlot slot = assignedResource; if (slot != null) { final TaskManagerGateway taskManagerGateway = slot.getTaskManagerGateway(); // TODO For some tests this could be a problem when querying too early if all resources were released taskManagerGateway.failPartition(attemptId); } }
/** * Gets the ID of the TaskManager that offers this slot. * * @return The ID of the TaskManager that offers this slot */ public ResourceID getTaskManagerID() { return allocatedSlot.getTaskManagerLocation().getResourceID(); }
@Override public Future<BlobKey> requestTaskManagerStdout(Time timeout) { return requestTaskManagerLog((TaskManagerMessages.RequestTaskManagerLog) TaskManagerMessages.getRequestTaskManagerStdout(), timeout); }
private void sendFailIntermediateResultPartitionsRpcCall() { final LogicalSlot slot = assignedResource; if (slot != null) { final TaskManagerGateway taskManagerGateway = slot.getTaskManagerGateway(); // TODO For some tests this could be a problem when querying too early if all resources were released taskManagerGateway.failPartition(attemptId); } }
@Override public CompletableFuture<TransientBlobKey> requestTaskManagerLog(Time timeout) { return requestTaskManagerLog((TaskManagerMessages.RequestTaskManagerLog) TaskManagerMessages.getRequestTaskManagerLog(), timeout); }
@Override public CompletableFuture<TransientBlobKey> requestTaskManagerStdout(Time timeout) { return requestTaskManagerLog((TaskManagerMessages.RequestTaskManagerLog) TaskManagerMessages.getRequestTaskManagerStdout(), timeout); }
@Override public CompletableFuture<TransientBlobKey> requestTaskManagerStdout(Time timeout) { return requestTaskManagerLog((TaskManagerMessages.RequestTaskManagerLog) TaskManagerMessages.getRequestTaskManagerStdout(), timeout); }