Class InputGateDeploymentDescriptor
- java.lang.Object
-
- org.apache.flink.runtime.deployment.InputGateDeploymentDescriptor
-
- All Implemented Interfaces:
Serializable
public class InputGateDeploymentDescriptor extends Object implements Serializable
Deployment descriptor for a single input gate instance.Each input gate consumes partitions of a single intermediate result. The consumed subpartition index range is the same for each consumed partition.
- See Also:
SingleInputGate, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InputGateDeploymentDescriptor(IntermediateDataSetID consumedResultId, ResultPartitionType consumedPartitionType, int consumedSubpartitionIndex, TaskDeploymentDescriptorFactory.ShuffleDescriptorAndIndex[] inputChannels)InputGateDeploymentDescriptor(IntermediateDataSetID consumedResultId, ResultPartitionType consumedPartitionType, org.apache.flink.runtime.deployment.ConsumedSubpartitionContext consumedSubpartitionContext, int numberOfInputChannels, List<TaskDeploymentDescriptor.MaybeOffloaded<TaskDeploymentDescriptorFactory.ShuffleDescriptorGroup>> serializedInputChannels)InputGateDeploymentDescriptor(IntermediateDataSetID consumedResultId, ResultPartitionType consumedPartitionType, IndexRange consumedSubpartitionIndexRange, int numberOfInputChannels, List<TaskDeploymentDescriptor.MaybeOffloaded<TaskDeploymentDescriptorFactory.ShuffleDescriptorGroup>> serializedInputChannels)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultPartitionTypegetConsumedPartitionType()Returns the type of this input channel's consumed result partition.IntermediateDataSetIDgetConsumedResultId()Collection<IndexRange>getConsumedShuffleDescriptorRanges()IndexRangegetConsumedSubpartitionRange(int shuffleDescriptorIndex)intgetNumConsumedShuffleDescriptors()ShuffleDescriptor[]getShuffleDescriptors()Retrieves allShuffleDescriptors associated of this input gate deployment descriptor.StringtoString()voidtryLoadAndDeserializeShuffleDescriptors(PermanentBlobService blobService, org.apache.flink.api.common.JobID jobId, GroupCache<org.apache.flink.api.common.JobID,PermanentBlobKey,TaskDeploymentDescriptorFactory.ShuffleDescriptorGroup> shuffleDescriptorsCache)
-
-
-
Constructor Detail
-
InputGateDeploymentDescriptor
@VisibleForTesting public InputGateDeploymentDescriptor(IntermediateDataSetID consumedResultId, ResultPartitionType consumedPartitionType, @Nonnegative int consumedSubpartitionIndex, TaskDeploymentDescriptorFactory.ShuffleDescriptorAndIndex[] inputChannels) throws IOException
- Throws:
IOException
-
InputGateDeploymentDescriptor
public InputGateDeploymentDescriptor(IntermediateDataSetID consumedResultId, ResultPartitionType consumedPartitionType, IndexRange consumedSubpartitionIndexRange, int numberOfInputChannels, List<TaskDeploymentDescriptor.MaybeOffloaded<TaskDeploymentDescriptorFactory.ShuffleDescriptorGroup>> serializedInputChannels)
-
InputGateDeploymentDescriptor
public InputGateDeploymentDescriptor(IntermediateDataSetID consumedResultId, ResultPartitionType consumedPartitionType, org.apache.flink.runtime.deployment.ConsumedSubpartitionContext consumedSubpartitionContext, int numberOfInputChannels, List<TaskDeploymentDescriptor.MaybeOffloaded<TaskDeploymentDescriptorFactory.ShuffleDescriptorGroup>> serializedInputChannels)
-
-
Method Detail
-
getConsumedResultId
public IntermediateDataSetID getConsumedResultId()
-
getConsumedPartitionType
public ResultPartitionType getConsumedPartitionType()
Returns the type of this input channel's consumed result partition.- Returns:
- consumed result partition type
-
getNumConsumedShuffleDescriptors
public int getNumConsumedShuffleDescriptors()
-
getConsumedShuffleDescriptorRanges
public Collection<IndexRange> getConsumedShuffleDescriptorRanges()
-
getConsumedSubpartitionRange
public IndexRange getConsumedSubpartitionRange(int shuffleDescriptorIndex)
-
getShuffleDescriptors
public ShuffleDescriptor[] getShuffleDescriptors()
Retrieves allShuffleDescriptors associated of this input gate deployment descriptor.Note that the returned descriptors may not be fully consumed. The
getConsumedShuffleDescriptorRanges()method provides the indices of the shuffle descriptors that are really consumed.We need to return all
ShuffleDescriptors to maintain the mapping between the descriptors and the indices recorded in theConsumedSubpartitionContext.- Returns:
- an array of
ShuffleDescriptors. - Throws:
RuntimeException- if deserialization of shuffle descriptors fails.
-
tryLoadAndDeserializeShuffleDescriptors
public void tryLoadAndDeserializeShuffleDescriptors(@Nullable PermanentBlobService blobService, org.apache.flink.api.common.JobID jobId, GroupCache<org.apache.flink.api.common.JobID,PermanentBlobKey,TaskDeploymentDescriptorFactory.ShuffleDescriptorGroup> shuffleDescriptorsCache) throws IOException- Throws:
IOException
-
-