Interface Partitioner<K extends java.io.Serializable>
-
- Type Parameters:
K
- the key type of the partition to write.
- All Known Implementing Classes:
DedicatedKeyPerElementPartitioner
,HashPartitioner
,IntactPartitioner
public interface Partitioner<K extends java.io.Serializable>
This interface represents the way of partitioning output data from a source task. It takes an element and designates key of partition to write the element, according to the number of destination tasks, the key of each element, etc.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Partitioner
getPartitioner(ExecutionPropertyMap<EdgeExecutionProperty> edgeProperties, ExecutionPropertyMap<VertexExecutionProperty> dstProperties)
K
partition(java.lang.Object element)
Divides the output data from a task into multiple blocks.
-
-
-
Method Detail
-
partition
K partition(java.lang.Object element)
Divides the output data from a task into multiple blocks.- Parameters:
element
- the output element from a source task.- Returns:
- the key of the partition in the block to write the element.
-
getPartitioner
static Partitioner getPartitioner(ExecutionPropertyMap<EdgeExecutionProperty> edgeProperties, ExecutionPropertyMap<VertexExecutionProperty> dstProperties)
- Parameters:
edgeProperties
- edge properties.dstProperties
- vertex properties.- Returns:
- the partitioner.
-
-