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.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public int hashCode()
hashCode
in class org.apache.hadoop.io.BinaryComparable
public boolean equals(Object obj)
equals
in class org.apache.hadoop.io.BinaryComparable
public int compareTo(org.apache.hadoop.io.BinaryComparable other)
compareTo
in interface Comparable<org.apache.hadoop.io.BinaryComparable>
compareTo
in class org.apache.hadoop.io.BinaryComparable
public byte[] getBytes()
getBytes
in class org.apache.hadoop.io.BinaryComparable
public int getLength()
getLength
in class org.apache.hadoop.io.BinaryComparable
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.