public class TupleWritable extends Object implements org.apache.hadoop.io.WritableComparable<TupleWritable>
Constructor and Description |
---|
TupleWritable()
Create an empty tuple with no allocated storage for writables.
|
TupleWritable(org.apache.hadoop.io.Writable[] vals)
Initialize tuple with storage; unknown whether any of them contain
"written" values.
|
Modifier and Type | Method and Description |
---|---|
void |
clearWritten()
Clear any record of which writables have been written to, without releasing
storage.
|
void |
clearWritten(int i)
Record that the tuple does not contain an element at the position provided.
|
int |
compareTo(TupleWritable o) |
boolean |
equals(Object other) |
org.apache.hadoop.io.Writable |
get(int i)
Get ith Writable from Tuple.
|
boolean |
has(int i)
Return true if tuple has an element at the position provided.
|
int |
hashCode() |
void |
readFields(DataInput in) |
void |
setWritten(int i)
Record that the tuple contains an element at the position provided.
|
int |
size()
The number of children in this Tuple.
|
String |
toString()
Convert Tuple to String as in the following.
|
void |
write(DataOutput out)
Writes each Writable to
out . |
public TupleWritable()
public TupleWritable(org.apache.hadoop.io.Writable[] vals)
public boolean has(int i)
public org.apache.hadoop.io.Writable get(int i)
public int size()
public String toString()
public void write(DataOutput out) throws IOException
out
. TupleWritable format:
<count><type1><type2>...<typen><obj1><obj2>...<objn>
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void setWritten(int i)
public void clearWritten(int i)
public void clearWritten()
public int compareTo(TupleWritable o)
compareTo
in interface Comparable<TupleWritable>
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.