|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.htuple.ShuffleUtils.ConfigBuilder
public static class ShuffleUtils.ConfigBuilder
A builder that allows you to tune how partitioning,
sorting and grouping should work for a given MapReduce job using your Tuple instances.
| Constructor Summary | |
|---|---|
ShuffleUtils.ConfigBuilder()
|
|
| Method Summary | |
|---|---|
void |
configure(org.apache.hadoop.conf.Configuration conf)
Configure the supplied configuration object with any partitioner, sorting and grouping configs that were setup prior to calling this method. |
static int[] |
enumOrdinalsToArray(Enum<?>... enums)
|
ShuffleUtils.ConfigBuilder |
setGroupIndices(Enum<?>... indices)
Set the tuple indexes that will be used by the TupleComparator for grouping. |
ShuffleUtils.ConfigBuilder |
setGroupIndices(int... indices)
Set the tuple indexes that will be used by the TupleComparator for grouping. |
ShuffleUtils.ConfigBuilder |
setPartitionerIndices(Enum<?>... indices)
Set the tuple indexes that will be used by the Partitioner. |
ShuffleUtils.ConfigBuilder |
setPartitionerIndices(int... indices)
Set the tuple indexes that will be used by the Partitioner. |
ShuffleUtils.ConfigBuilder |
setSortIndices(Enum<?>... indices)
Set the tuple indexes that will be used by the TupleComparator for sorting. |
ShuffleUtils.ConfigBuilder |
setSortIndices(int... indices)
Set the tuple indexes that will be used by the TupleComparator for sorting. |
ShuffleUtils.ConfigBuilder |
useNewApi()
Indicate that the new org.apache.hadoop.mapreduce API should be used when configuring
the job. |
ShuffleUtils.ConfigBuilder |
useOldApi()
Indicate that the old org.apache.hadoop.mapred API should be used when configuring
the job. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShuffleUtils.ConfigBuilder()
| Method Detail |
|---|
public ShuffleUtils.ConfigBuilder useOldApi()
org.apache.hadoop.mapred API should be used when configuring
the job.
public ShuffleUtils.ConfigBuilder useNewApi()
org.apache.hadoop.mapreduce API should be used when configuring
the job.
public ShuffleUtils.ConfigBuilder setPartitionerIndices(int... indices)
Partitioner.
public ShuffleUtils.ConfigBuilder setPartitionerIndices(Enum<?>... indices)
Partitioner.
The ordinal values of the supplied arguments are used to determine the indexes.
public ShuffleUtils.ConfigBuilder setSortIndices(int... indices)
TupleComparator for sorting.
These indexes are used according to the order that they are supplied to this method. In other words,
if you call setSortIndices(2, 1);, then the 3rd element will be used for sorting
followed by the second element.
public ShuffleUtils.ConfigBuilder setSortIndices(Enum<?>... indices)
TupleComparator for sorting.
The ordinal values of the supplied arguments are used to determine the indexes.
These indexes are used according to the order that they are supplied to this method. In other words,
if you call setSortIndices(2, 1);, then the 3rd element will be used for sorting
followed by the second element.
public ShuffleUtils.ConfigBuilder setGroupIndices(int... indices)
TupleComparator for grouping.
These indexes are used according to the order that they are supplied to this method. In other words,
if you call setGroupIndices(2, 1);, then the 3rd element will be used for grouping
followed by the second element.
public ShuffleUtils.ConfigBuilder setGroupIndices(Enum<?>... indices)
TupleComparator for grouping.
The ordinal values of the supplied arguments are used to determine the indexes.
These indexes are used according to the order that they are supplied to this method. In other words,
if you call setGroupIndices(2, 1);, then the 3rd element will be used for grouping
followed by the second element.
public void configure(org.apache.hadoop.conf.Configuration conf)
conf - the Hadoop configuration to be populatedpublic static int[] enumOrdinalsToArray(Enum<?>... enums)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||