T
- Type of the elements in the Stream being partitioned@Internal public class KeyGroupStreamPartitioner<T,K> extends StreamPartitioner<T> implements ConfigurableStreamPartitioner
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[] |
selectChannels(SerializationDelegate<StreamRecord<T>> record,
int numberOfOutputChannels)
Returns the logical channel indexes, to which the given record should be
written.
|
String |
toString() |
public KeyGroupStreamPartitioner(KeySelector<T,K> keySelector, int maxParallelism)
public int getMaxParallelism()
public int[] selectChannels(SerializationDelegate<StreamRecord<T>> record, int numberOfOutputChannels)
ChannelSelector
selectChannels
in interface ChannelSelector<SerializationDelegate<StreamRecord<T>>>
record
- the record to the determine the output channels fornumberOfOutputChannels
- the total number of output channels which are attached to respective output gatepublic 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–2019 The Apache Software Foundation. All rights reserved.