public class TupleWritable extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.io.WritableComparable<TupleWritable>
Tuple
.
tuple_writable ::= card field+ card ::= vint field ::= code [body_size body] code ::= vint body_size ::= vint body ::= byte[]
Modifier and Type | Class and Description |
---|---|
static class |
TupleWritable.Comparator |
Constructor and Description |
---|
TupleWritable()
Create an empty tuple with no allocated storage for writables.
|
TupleWritable(org.apache.hadoop.io.Writable[] values) |
TupleWritable(org.apache.hadoop.io.Writable[] values,
int[] written)
Initialize tuple with storage; unknown whether any of them contain
"written" values.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
int |
compareTo(TupleWritable that) |
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 |
set(int index,
org.apache.hadoop.io.Writable w) |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
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[] values)
public TupleWritable(org.apache.hadoop.io.Writable[] values, int[] written)
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
setConf
in class org.apache.hadoop.conf.Configured
public boolean has(int i)
public org.apache.hadoop.io.Writable get(int i)
public int size()
public String toString()
public void clear()
public void set(int index, org.apache.hadoop.io.Writable w)
public void write(DataOutput out) throws IOException
out
.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 int compareTo(TupleWritable that)
compareTo
in interface Comparable<TupleWritable>
Copyright © 2016 The Apache Software Foundation. All rights reserved.