T
- Type of the elements in the Stream being partitioned@Internal public class KeyGroupStreamPartitioner<T,K> extends StreamPartitioner<T> implements ConfigurableStreamPartitioner
numberOfChannels
Constructor and Description |
---|
KeyGroupStreamPartitioner(KeySelector<T,K> keySelector,
int maxParallelism) |
Modifier and Type | Method and Description |
---|---|
void |
configure(int maxParallelism)
Configure the
StreamPartitioner with the maximum parallelism of the down stream
operator. |
StreamPartitioner<T> |
copy() |
boolean |
equals(Object o) |
SubtaskStateMapper |
getDownstreamSubtaskStateMapper()
Defines the behavior of this partitioner, when downstream rescaled during recovery of
in-flight data.
|
int |
getMaxParallelism() |
int |
hashCode() |
boolean |
isPointwise() |
int |
selectChannel(SerializationDelegate<StreamRecord<T>> record)
Returns the logical channel index, to which the given record should be written.
|
String |
toString() |
disableUnalignedCheckpoints, getUpstreamSubtaskStateMapper, isBroadcast, isSupportsUnalignedCheckpoint, setup
public KeyGroupStreamPartitioner(KeySelector<T,K> keySelector, int maxParallelism)
public int getMaxParallelism()
public int selectChannel(SerializationDelegate<StreamRecord<T>> record)
ChannelSelector
UnsupportedOperationException
).selectChannel
in interface ChannelSelector<SerializationDelegate<StreamRecord<T>>>
record
- the record to determine the output channels for.public SubtaskStateMapper getDownstreamSubtaskStateMapper()
StreamPartitioner
getDownstreamSubtaskStateMapper
in class StreamPartitioner<T>
public StreamPartitioner<T> copy()
copy
in class StreamPartitioner<T>
public boolean isPointwise()
isPointwise
in class StreamPartitioner<T>
public void configure(int maxParallelism)
ConfigurableStreamPartitioner
StreamPartitioner
with the maximum parallelism of the down stream
operator.configure
in interface ConfigurableStreamPartitioner
maxParallelism
- Maximum parallelism of the down stream operator.public boolean equals(Object o)
equals
in class StreamPartitioner<T>
public int hashCode()
hashCode
in class StreamPartitioner<T>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.