Class TaskDeploymentDescriptor
- java.lang.Object
-
- org.apache.flink.runtime.deployment.TaskDeploymentDescriptor
-
- All Implemented Interfaces:
Serializable
public final class TaskDeploymentDescriptor extends Object implements Serializable
A task deployment descriptor contains all the information necessary to deploy a task on a task manager.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTaskDeploymentDescriptor.MaybeOffloaded<T>Wrapper class for serialized values which may be offloaded to theBlobServeror not.static classTaskDeploymentDescriptor.NonOffloaded<T>A serialized value that is not offloaded to theBlobServer.static classTaskDeploymentDescriptor.Offloaded<T>Reference to a serialized value that was offloaded to theBlobServer.
-
Constructor Summary
Constructors Constructor Description TaskDeploymentDescriptor(org.apache.flink.api.common.JobID jobId, TaskDeploymentDescriptor.MaybeOffloaded<JobInformation> serializedJobInformation, TaskDeploymentDescriptor.MaybeOffloaded<TaskInformation> serializedTaskInformation, ExecutionAttemptID executionAttemptId, AllocationID allocationId, JobManagerTaskRestore taskRestore, List<ResultPartitionDeploymentDescriptor> resultPartitionDeploymentDescriptors, List<InputGateDeploymentDescriptor> inputGateDeploymentDescriptors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AllocationIDgetAllocationId()intgetAttemptNumber()Returns the attempt number of the subtask.ExecutionAttemptIDgetExecutionAttemptId()List<InputGateDeploymentDescriptor>getInputGates()org.apache.flink.api.common.JobIDgetJobId()Returns the task's job ID.List<ResultPartitionDeploymentDescriptor>getProducedPartitions()org.apache.flink.util.SerializedValue<JobInformation>getSerializedJobInformation()Return the sub task's serialized job information.org.apache.flink.util.SerializedValue<TaskInformation>getSerializedTaskInformation()Return the sub task's serialized task information.intgetSubtaskIndex()Returns the task's index in the subtask group.JobManagerTaskRestoregetTaskRestore()voidloadBigData(PermanentBlobService blobService, ShuffleDescriptorsCache shuffleDescriptorsCache)Loads externalized data from the BLOB store back to the object.StringtoString()
-
-
-
Constructor Detail
-
TaskDeploymentDescriptor
public TaskDeploymentDescriptor(org.apache.flink.api.common.JobID jobId, TaskDeploymentDescriptor.MaybeOffloaded<JobInformation> serializedJobInformation, TaskDeploymentDescriptor.MaybeOffloaded<TaskInformation> serializedTaskInformation, ExecutionAttemptID executionAttemptId, AllocationID allocationId, @Nullable JobManagerTaskRestore taskRestore, List<ResultPartitionDeploymentDescriptor> resultPartitionDeploymentDescriptors, List<InputGateDeploymentDescriptor> inputGateDeploymentDescriptors)
-
-
Method Detail
-
getSerializedJobInformation
public org.apache.flink.util.SerializedValue<JobInformation> getSerializedJobInformation()
Return the sub task's serialized job information.- Returns:
- serialized job information (may throw
IllegalStateExceptionifloadBigData(org.apache.flink.runtime.blob.PermanentBlobService, org.apache.flink.runtime.taskexecutor.ShuffleDescriptorsCache)is not called beforehand). - Throws:
IllegalStateException- If job information is offloaded to BLOB store.
-
getSerializedTaskInformation
public org.apache.flink.util.SerializedValue<TaskInformation> getSerializedTaskInformation()
Return the sub task's serialized task information.- Returns:
- serialized task information (may throw
IllegalStateExceptionifloadBigData(org.apache.flink.runtime.blob.PermanentBlobService, org.apache.flink.runtime.taskexecutor.ShuffleDescriptorsCache)is not called beforehand)). - Throws:
IllegalStateException- If job information is offloaded to BLOB store.
-
getJobId
public org.apache.flink.api.common.JobID getJobId()
Returns the task's job ID.- Returns:
- the job ID this task belongs to
-
getExecutionAttemptId
public ExecutionAttemptID getExecutionAttemptId()
-
getSubtaskIndex
public int getSubtaskIndex()
Returns the task's index in the subtask group.- Returns:
- the task's index in the subtask group
-
getAttemptNumber
public int getAttemptNumber()
Returns the attempt number of the subtask.
-
getProducedPartitions
public List<ResultPartitionDeploymentDescriptor> getProducedPartitions()
-
getInputGates
public List<InputGateDeploymentDescriptor> getInputGates()
-
getTaskRestore
@Nullable public JobManagerTaskRestore getTaskRestore()
-
getAllocationId
public AllocationID getAllocationId()
-
loadBigData
public void loadBigData(@Nullable PermanentBlobService blobService, ShuffleDescriptorsCache shuffleDescriptorsCache) throws IOException, ClassNotFoundException
Loads externalized data from the BLOB store back to the object.- Parameters:
blobService- the blob store to use (may be null ifserializedJobInformationandserializedTaskInformationare non-null)shuffleDescriptorsCache- cache of shuffle descriptors to reduce the cost of deserialization- Throws:
IOException- during errors retrieving or reading the BLOBsClassNotFoundException- Class of a serialized object cannot be found.
-
-