@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface Partitioner
Partitioner
is used by the TEZ framework to partition output
key/value pairs.
Partitioner Initialization The Partitioner class is picked up
using the TEZ_RUNTIME_PARTITIONER_CLASS attribute in TezRuntimeConfiguration
TODO NEWTEZ Change construction to first check for a Constructor with a bytep[] payload
Partitioners need to provide a single argument (Configuration
)
constructor or a 0 argument constructor. If both exist, preference is given
to the single argument constructor. This is primarily for MR support.
If using the configuration constructor, TEZ_RUNTIME_NUM_EXPECTED_PARTITIONS
will be set in the configuration, to indicate the max number of expected
partitions.Modifier and Type | Method and Description |
---|---|
int |
getPartition(Object key,
Object value,
int numPartitions)
Get partition for given key/value.
|
Copyright © 2016 Apache Software Foundation. All rights reserved.