Package org.apache.beam.sdk.transforms
Interface Partition.PartitionWithSideInputsFn<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
partitionFor(T elem, int numPartitions, Contextful.Fn.Context c)
Chooses the partition into which to put the given element.
-
-
-
Method Detail
-
partitionFor
int partitionFor(T elem, int numPartitions, Contextful.Fn.Context c)
Chooses the partition into which to put the given element.- Parameters:
elem
- the element to be partitionednumPartitions
- the total number of partitions (>= 1
)c
- theContextful.Fn.Context
needed to access sideInputs.- Returns:
- index of the selected partition (in the range
[0..numPartitions-1]
)
-
-