Class BinaryHashPartitioner
- java.lang.Object
-
- org.apache.flink.streaming.runtime.partitioner.StreamPartitioner<RowData>
-
- org.apache.flink.table.runtime.partitioner.BinaryHashPartitioner
-
- All Implemented Interfaces:
Serializable
,ChannelSelector<SerializationDelegate<StreamRecord<RowData>>>
public class BinaryHashPartitioner extends StreamPartitioner<RowData>
Hash partitioner forBinaryRowData
.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.flink.streaming.runtime.partitioner.StreamPartitioner
numberOfChannels
-
-
Constructor Summary
Constructors Constructor Description BinaryHashPartitioner(GeneratedHashFunction genHashFunc, String[] hashFieldNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamPartitioner<RowData>
copy()
boolean
equals(Object o)
SubtaskStateMapper
getDownstreamSubtaskStateMapper()
Defines the behavior of this partitioner, when downstream rescaled during recovery of in-flight data.int
hashCode()
boolean
isPointwise()
int
selectChannel(SerializationDelegate<StreamRecord<RowData>> record)
Returns the logical channel index, to which the given record should be written.String
toString()
-
Methods inherited from class org.apache.flink.streaming.runtime.partitioner.StreamPartitioner
disableUnalignedCheckpoints, getUpstreamSubtaskStateMapper, isBroadcast, isSupportsUnalignedCheckpoint, setup
-
-
-
-
Constructor Detail
-
BinaryHashPartitioner
public BinaryHashPartitioner(GeneratedHashFunction genHashFunc, String[] hashFieldNames)
-
-
Method Detail
-
copy
public StreamPartitioner<RowData> copy()
- Specified by:
copy
in classStreamPartitioner<RowData>
-
selectChannel
public int selectChannel(SerializationDelegate<StreamRecord<RowData>> record)
Description copied from interface:ChannelSelector
Returns the logical channel index, to which the given record should be written. It is illegal to call this method for broadcast channel selectors and this method can remain not implemented in that case (for example by throwingUnsupportedOperationException
).- Parameters:
record
- the record to determine the output channels for.- Returns:
- an integer number which indicates the index of the output channel through which the record shall be forwarded.
-
getDownstreamSubtaskStateMapper
public SubtaskStateMapper getDownstreamSubtaskStateMapper()
Description copied from class:StreamPartitioner
Defines the behavior of this partitioner, when downstream rescaled during recovery of in-flight data.- Specified by:
getDownstreamSubtaskStateMapper
in classStreamPartitioner<RowData>
-
isPointwise
public boolean isPointwise()
- Specified by:
isPointwise
in classStreamPartitioner<RowData>
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classStreamPartitioner<RowData>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classStreamPartitioner<RowData>
-
-