Package org.apache.flink.runtime.shuffle
Class NettyShuffleDescriptor
- java.lang.Object
-
- org.apache.flink.runtime.shuffle.NettyShuffleDescriptor
-
- All Implemented Interfaces:
Serializable
,ShuffleDescriptor
public class NettyShuffleDescriptor extends Object implements ShuffleDescriptor
Default implementation ofShuffleDescriptor
forNettyShuffleMaster
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NettyShuffleDescriptor.LocalExecutionPartitionConnectionInfo
Local partition connection information.static class
NettyShuffleDescriptor.NetworkPartitionConnectionInfo
Remote partition connection information with index to query partition.static interface
NettyShuffleDescriptor.PartitionConnectionInfo
Information for connection to partition producer for shuffle exchange.
-
Constructor Summary
Constructors Constructor Description NettyShuffleDescriptor(ResourceID producerLocation, NettyShuffleDescriptor.PartitionConnectionInfo partitionConnectionInfo, ResultPartitionID resultPartitionID)
NettyShuffleDescriptor(ResourceID producerLocation, NettyShuffleDescriptor.PartitionConnectionInfo partitionConnectionInfo, ResultPartitionID resultPartitionID, List<TierShuffleDescriptor> tierShuffleDescriptors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectionID
getConnectionId()
ResultPartitionID
getResultPartitionID()
List<TierShuffleDescriptor>
getTierShuffleDescriptors()
boolean
isLocalTo(ResourceID consumerLocation)
Optional<ResourceID>
storesLocalResourcesOn()
Returns the location of the producing task executor if the partition occupies local resources there.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.runtime.shuffle.ShuffleDescriptor
isUnknown
-
-
-
-
Constructor Detail
-
NettyShuffleDescriptor
public NettyShuffleDescriptor(ResourceID producerLocation, NettyShuffleDescriptor.PartitionConnectionInfo partitionConnectionInfo, ResultPartitionID resultPartitionID)
-
NettyShuffleDescriptor
public NettyShuffleDescriptor(ResourceID producerLocation, NettyShuffleDescriptor.PartitionConnectionInfo partitionConnectionInfo, ResultPartitionID resultPartitionID, @Nullable List<TierShuffleDescriptor> tierShuffleDescriptors)
-
-
Method Detail
-
getConnectionId
public ConnectionID getConnectionId()
-
getResultPartitionID
public ResultPartitionID getResultPartitionID()
- Specified by:
getResultPartitionID
in interfaceShuffleDescriptor
-
storesLocalResourcesOn
public Optional<ResourceID> storesLocalResourcesOn()
Description copied from interface:ShuffleDescriptor
Returns the location of the producing task executor if the partition occupies local resources there.Indicates that this partition occupies local resources in the producing task executor. Such partition requires that the task executor is running and being connected to be able to consume the produced data. This is mostly relevant for the batch jobs and blocking result partitions which can outlive the producer lifetime and be released externally.
ShuffleEnvironment.releasePartitionsLocally(Collection)
can be used to release such kind of partitions locally.- Specified by:
storesLocalResourcesOn
in interfaceShuffleDescriptor
- Returns:
- the resource id of the producing task executor if the partition occupies local resources there
-
isLocalTo
public boolean isLocalTo(ResourceID consumerLocation)
-
getTierShuffleDescriptors
@Nullable public List<TierShuffleDescriptor> getTierShuffleDescriptors()
-
-