T
- Type of the elements in the Stream being broadcast@Internal public class BroadcastPartitioner<T> extends StreamPartitioner<T>
numberOfChannels
Constructor and Description |
---|
BroadcastPartitioner() |
Modifier and Type | Method and Description |
---|---|
StreamPartitioner<T> |
copy() |
SubtaskStateMapper |
getDownstreamSubtaskStateMapper()
Defines the behavior of this partitioner, when downstream rescaled during recovery of
in-flight data.
|
SubtaskStateMapper |
getUpstreamSubtaskStateMapper()
Defines the behavior of this partitioner, when upstream rescaled during recovery of in-flight
data.
|
boolean |
isBroadcast()
Returns whether the channel selector always selects all the output channels.
|
boolean |
isPointwise() |
int |
selectChannel(SerializationDelegate<StreamRecord<T>> record)
Note: Broadcast mode could be handled directly for all the output channels in record writer,
so it is no need to select channels via this method.
|
String |
toString() |
equals, hashCode, setup
public int selectChannel(SerializationDelegate<StreamRecord<T>> record)
record
- the record to determine the output channels for.public SubtaskStateMapper getUpstreamSubtaskStateMapper()
StreamPartitioner
getUpstreamSubtaskStateMapper
in class StreamPartitioner<T>
public SubtaskStateMapper getDownstreamSubtaskStateMapper()
StreamPartitioner
getDownstreamSubtaskStateMapper
in class StreamPartitioner<T>
public boolean isBroadcast()
ChannelSelector
isBroadcast
in interface ChannelSelector<SerializationDelegate<StreamRecord<T>>>
isBroadcast
in class StreamPartitioner<T>
public StreamPartitioner<T> copy()
copy
in class StreamPartitioner<T>
public boolean isPointwise()
isPointwise
in class StreamPartitioner<T>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.