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() |
int |
getMaxParallelism() |
int |
selectChannel(SerializationDelegate<StreamRecord<T>> record)
Returns the logical channel index, to which the given record should be written.
|
String |
toString() |
isBroadcast, 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 StreamPartitioner<T> copy()
copy
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.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.