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 class
TaskDeploymentDescriptor.MaybeOffloaded<T>
Wrapper class for serialized values which may be offloaded to theBlobServer
or not.static class
TaskDeploymentDescriptor.NonOffloaded<T>
A serialized value that is not offloaded to theBlobServer
.static class
TaskDeploymentDescriptor.Offloaded<T>
Reference to a serialized value that was offloaded to theBlobServer
.
-
Constructor Summary
Constructors Constructor Description TaskDeploymentDescriptor(JobID jobId, TaskDeploymentDescriptor.MaybeOffloaded<JobInformation> serializedJobInformation, TaskDeploymentDescriptor.MaybeOffloaded<TaskInformation> serializedTaskInformation, ExecutionAttemptID executionAttemptId, AllocationID allocationId, JobManagerTaskRestore taskRestore, List<ResultPartitionDeploymentDescriptor> resultPartitionDeploymentDescriptors, List<InputGateDeploymentDescriptor> inputGateDeploymentDescriptors)
-
Method Summary
-
-
-
Constructor Detail
-
TaskDeploymentDescriptor
public TaskDeploymentDescriptor(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
-
getJobInformation
public JobInformation getJobInformation() throws IOException, ClassNotFoundException
Return the sub task's job information.- Returns:
- job information (may throw
IllegalStateException
ifloadBigData(org.apache.flink.runtime.blob.PermanentBlobService, org.apache.flink.runtime.util.GroupCache<org.apache.flink.api.common.JobID, org.apache.flink.runtime.blob.PermanentBlobKey, org.apache.flink.runtime.executiongraph.JobInformation>, org.apache.flink.runtime.util.GroupCache<org.apache.flink.api.common.JobID, org.apache.flink.runtime.blob.PermanentBlobKey, org.apache.flink.runtime.executiongraph.TaskInformation>, org.apache.flink.runtime.util.GroupCache<org.apache.flink.api.common.JobID, org.apache.flink.runtime.blob.PermanentBlobKey, org.apache.flink.runtime.deployment.TaskDeploymentDescriptorFactory.ShuffleDescriptorGroup>)
is not called beforehand). - Throws:
IllegalStateException
- If job information is offloaded to BLOB store.IOException
ClassNotFoundException
-
getTaskInformation
public TaskInformation getTaskInformation() throws IOException, ClassNotFoundException
Return the sub task's task information.- Returns:
- task information (may throw
IllegalStateException
ifloadBigData(org.apache.flink.runtime.blob.PermanentBlobService, org.apache.flink.runtime.util.GroupCache<org.apache.flink.api.common.JobID, org.apache.flink.runtime.blob.PermanentBlobKey, org.apache.flink.runtime.executiongraph.JobInformation>, org.apache.flink.runtime.util.GroupCache<org.apache.flink.api.common.JobID, org.apache.flink.runtime.blob.PermanentBlobKey, org.apache.flink.runtime.executiongraph.TaskInformation>, org.apache.flink.runtime.util.GroupCache<org.apache.flink.api.common.JobID, org.apache.flink.runtime.blob.PermanentBlobKey, org.apache.flink.runtime.deployment.TaskDeploymentDescriptorFactory.ShuffleDescriptorGroup>)
is not called beforehand)). - Throws:
IllegalStateException
- If job information is offloaded to BLOB store.IOException
ClassNotFoundException
-
getJobId
public 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, GroupCache<JobID,PermanentBlobKey,JobInformation> jobInformationCache, GroupCache<JobID,PermanentBlobKey,TaskInformation> taskInformationCache, GroupCache<JobID,PermanentBlobKey,TaskDeploymentDescriptorFactory.ShuffleDescriptorGroup> 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 ifserializedJobInformation
andserializedTaskInformation
are 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.
-
-