public final class IntPairWritable extends org.apache.hadoop.io.BinaryComparable implements org.apache.hadoop.io.WritableComparable<org.apache.hadoop.io.BinaryComparable>, Cloneable
WritableComparable which encapsulates an ordered pair of signed integers.| Modifier and Type | Class and Description |
|---|---|
static class |
IntPairWritable.Comparator |
static class |
IntPairWritable.FirstGroupingComparator
Compare only the first part of the pair, so that reduce is called once for each value of the first part.
|
static class |
IntPairWritable.Frequency
A wrapper class that associates pairs with frequency (Occurrences)
|
| Constructor and Description |
|---|
IntPairWritable() |
IntPairWritable(int x,
int y) |
IntPairWritable(IntPairWritable pair) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
int |
compareTo(org.apache.hadoop.io.BinaryComparable other) |
boolean |
equals(Object obj) |
byte[] |
getBytes() |
int |
getFirst() |
int |
getLength() |
int |
getSecond() |
int |
hashCode() |
void |
readFields(DataInput in) |
void |
set(int x,
int y) |
void |
setFirst(int x) |
void |
setSecond(int y) |
String |
toString() |
void |
write(DataOutput out) |
public IntPairWritable()
public IntPairWritable(IntPairWritable pair)
public IntPairWritable(int x,
int y)
public void set(int x,
int y)
public void setFirst(int x)
public int getFirst()
public void setSecond(int y)
public int getSecond()
public void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic int hashCode()
hashCode in class org.apache.hadoop.io.BinaryComparablepublic boolean equals(Object obj)
equals in class org.apache.hadoop.io.BinaryComparablepublic int compareTo(org.apache.hadoop.io.BinaryComparable other)
compareTo in interface Comparable<org.apache.hadoop.io.BinaryComparable>compareTo in class org.apache.hadoop.io.BinaryComparablepublic byte[] getBytes()
getBytes in class org.apache.hadoop.io.BinaryComparablepublic int getLength()
getLength in class org.apache.hadoop.io.BinaryComparableCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.