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.JobInformationgetJobInformation()Return the sub task's job information.List<ResultPartitionDeploymentDescriptor>getProducedPartitions()intgetSubtaskIndex()Returns the task's index in the subtask group.TaskInformationgetTaskInformation()Return the sub task's task information.JobManagerTaskRestoregetTaskRestore()voidloadBigData(PermanentBlobService blobService, GroupCache<org.apache.flink.api.common.JobID,PermanentBlobKey,JobInformation> jobInformationCache, GroupCache<org.apache.flink.api.common.JobID,PermanentBlobKey,TaskInformation> taskInformationCache, GroupCache<org.apache.flink.api.common.JobID,PermanentBlobKey,TaskDeploymentDescriptorFactory.ShuffleDescriptorGroup> 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
-
getJobInformation
public JobInformation getJobInformation() throws IOException, ClassNotFoundException
Return the sub task's job information.- Returns:
- job information (may throw
IllegalStateExceptionifloadBigData(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.IOExceptionClassNotFoundException
-
getTaskInformation
public TaskInformation getTaskInformation() throws IOException, ClassNotFoundException
Return the sub task's task information.- Returns:
- task information (may throw
IllegalStateExceptionifloadBigData(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.IOExceptionClassNotFoundException
-
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, GroupCache<org.apache.flink.api.common.JobID,PermanentBlobKey,JobInformation> jobInformationCache, GroupCache<org.apache.flink.api.common.JobID,PermanentBlobKey,TaskInformation> taskInformationCache, GroupCache<org.apache.flink.api.common.JobID,PermanentBlobKey,TaskDeploymentDescriptorFactory.ShuffleDescriptorGroup> shuffleDescriptorsCache) throws IOException, ClassNotFoundExceptionLoads 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.
-
-