Class KeyGroupStreamPartitioner<T,K>
- java.lang.Object
-
- org.apache.flink.streaming.runtime.partitioner.StreamPartitioner<T>
-
- org.apache.flink.streaming.runtime.partitioner.KeyGroupStreamPartitioner<T,K>
-
- Type Parameters:
T- Type of the elements in the Stream being partitioned
- All Implemented Interfaces:
Serializable,org.apache.flink.runtime.io.network.api.writer.ChannelSelector<org.apache.flink.runtime.plugable.SerializationDelegate<StreamRecord<T>>>,ConfigurableStreamPartitioner
@Internal public class KeyGroupStreamPartitioner<T,K> extends StreamPartitioner<T> implements ConfigurableStreamPartitioner
Partitioner selects the target channel based on the key group index.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.flink.streaming.runtime.partitioner.StreamPartitioner
numberOfChannels
-
-
Constructor Summary
Constructors Constructor Description KeyGroupStreamPartitioner(org.apache.flink.api.java.functions.KeySelector<T,K> keySelector, int maxParallelism)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(int maxParallelism)Configure theStreamPartitionerwith the maximum parallelism of the down stream operator.StreamPartitioner<T>copy()booleanequals(Object o)org.apache.flink.runtime.io.network.api.writer.SubtaskStateMappergetDownstreamSubtaskStateMapper()Defines the behavior of this partitioner, when downstream rescaled during recovery of in-flight data.intgetMaxParallelism()inthashCode()booleanisPointwise()intselectChannel(org.apache.flink.runtime.plugable.SerializationDelegate<StreamRecord<T>> record)StringtoString()-
Methods inherited from class org.apache.flink.streaming.runtime.partitioner.StreamPartitioner
disableUnalignedCheckpoints, getUpstreamSubtaskStateMapper, isBroadcast, isSupportsUnalignedCheckpoint, setup
-
-
-
-
Method Detail
-
getMaxParallelism
public int getMaxParallelism()
-
selectChannel
public int selectChannel(org.apache.flink.runtime.plugable.SerializationDelegate<StreamRecord<T>> record)
- Specified by:
selectChannelin interfaceorg.apache.flink.runtime.io.network.api.writer.ChannelSelector<T>
-
getDownstreamSubtaskStateMapper
public org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper getDownstreamSubtaskStateMapper()
Description copied from class:StreamPartitionerDefines the behavior of this partitioner, when downstream rescaled during recovery of in-flight data.- Specified by:
getDownstreamSubtaskStateMapperin classStreamPartitioner<T>
-
copy
public StreamPartitioner<T> copy()
- Specified by:
copyin classStreamPartitioner<T>
-
isPointwise
public boolean isPointwise()
- Specified by:
isPointwisein classStreamPartitioner<T>
-
configure
public void configure(int maxParallelism)
Description copied from interface:ConfigurableStreamPartitionerConfigure theStreamPartitionerwith the maximum parallelism of the down stream operator.- Specified by:
configurein interfaceConfigurableStreamPartitioner- Parameters:
maxParallelism- Maximum parallelism of the down stream operator.
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classStreamPartitioner<T>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classStreamPartitioner<T>
-
-