T - the type of datapublic interface PartitionFunc<T> extends java.io.Serializable, TaskPartitioner<T>
| Modifier and Type | Method and Description |
|---|---|
default void |
commit(int source,
int partition)
Commit the partition
|
int |
partition(int sourceIndex,
T val)
Computes the partition for the given key.
|
default void |
prepare(java.util.Set<java.lang.Integer> sources,
java.util.Set<java.lang.Integer> destinations)
Prepare the function
|
default void prepare(java.util.Set<java.lang.Integer> sources,
java.util.Set<java.lang.Integer> destinations)
prepare in interface TaskPartitioner<T>sources - sourcedestinations - destinationsint partition(int sourceIndex,
T val)
partition in interface TaskPartitioner<T>val - value.sourceIndex - source of the datadefault void commit(int source,
int partition)
commit in interface TaskPartitioner<T>source - the sourcepartition - partition