TGroup - type for groupingTOrder - type for orderingpublic abstract class ShuffleKey<TGroup extends WritableRawComparable,TOrder extends WritableRawComparable> extends Object implements WritableRawComparable
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
ShuffleKey.AbstractGroupComparator
An abstract implementation of grouping comparator for  
ShuffleKey. | 
static class  | 
ShuffleKey.AbstractOrderComparator
An abstract implementation of ordering comparator for  
ShuffleKey. | 
static class  | 
ShuffleKey.Partitioner
An implementation of partitioner for  
ShuffleKey. | 
| Modifier | Constructor and Description | 
|---|---|
protected  | 
ShuffleKey(Class<TGroup> groupType,
          Class<TOrder> orderType)
Creates a new instance. 
 | 
protected  | 
ShuffleKey(TGroup groupObject,
          TOrder orderObject)
Creates a new instance. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
compareInBytes(byte[] b1,
              int o1,
              byte[] b2,
              int o2)
Compares two objects in bytes. 
 | 
int | 
compareTo(WritableRawComparable o)  | 
boolean | 
equals(Object obj)  | 
TGroup | 
getGroupObject()
Returns an object for grouping. 
 | 
TOrder | 
getOrderObject()
Returns an object for ordering. 
 | 
int | 
getSizeInBytes(byte[] buf,
              int offset)
Computes and returns size in bytes. 
 | 
int | 
hashCode()  | 
void | 
readFields(DataInput in)  | 
String | 
toString()  | 
void | 
write(DataOutput out)  | 
protected ShuffleKey(Class<TGroup> groupType, Class<TOrder> orderType)
groupType - type for groupingorderType - tyoe for orderingIllegalArgumentException - if some parameters were nullprotected ShuffleKey(TGroup groupObject, TOrder orderObject)
groupObject - object for groupingorderObject - object for orderingIllegalArgumentException - if some parameters were nullpublic final TGroup getGroupObject()
public final TOrder getOrderObject()
public final int compareTo(WritableRawComparable o)
compareTo in interface Comparable<WritableRawComparable>public final void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic final void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic final int getSizeInBytes(byte[] buf,
                                int offset)
                         throws IOException
WritableRawComparablegetSizeInBytes in interface WritableRawComparablebuf - bytes arrayoffset - bytes offsetIOException - if failed to compute sizepublic final int compareInBytes(byte[] b1,
                                int o1,
                                byte[] b2,
                                int o2)
                         throws IOException
WritableRawComparablecompareInBytes in interface WritableRawComparableb1 - bytes representation of the first objecto1 - offset of the first objectb2 - bytes representation of the second objecto2 - offset of the second objectIOException - if failed to comparisonCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.