Package org.apache.flink.python.legacy
Class IdPartitioner
- java.lang.Object
-
- org.apache.flink.python.legacy.IdPartitioner
-
- All Implemented Interfaces:
Serializable
,Function
,Partitioner<Integer>
@Internal public class IdPartitioner extends Object implements Partitioner<Integer>
Partitioner that partitions by id.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IdPartitioner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
partition(Integer key, int numPartitions)
Computes the partition for the given key.
-
-
-
Method Detail
-
partition
public int partition(Integer key, int numPartitions)
Description copied from interface:Partitioner
Computes the partition for the given key.- Specified by:
partition
in interfacePartitioner<Integer>
- Parameters:
key
- The key.numPartitions
- The number of partitions to partition into.- Returns:
- The partition index.
-
-