|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Tuple
An ordered list of Data. A tuple has fields, numbered 0 through (number of fields - 1). The entry in the field can be any datatype, or it can be null. Tuples are constructed only by a TupleFactory. A DefaultTupleFactory is provided by the system. If a user wishes to use their own type of Tuple, they should also provide an implementation of TupleFactory to construct their types of Tuples. Fields are numbered from 0.
Field Summary | |
---|---|
static byte |
NOTNULL
Marker for indicating whether the value this object holds is not a null |
static byte |
NULL
Marker for indicating whether the value this object holds is a null |
Method Summary | |
---|---|
void |
append(Object val)
Append a field to a tuple. |
Object |
get(int fieldNum)
Get the value in a given field. |
List<Object> |
getAll()
Get all of the fields in the tuple as a list. |
long |
getMemorySize()
Determine the size of tuple in memory. |
byte |
getType(int fieldNum)
Find the type of a given field. |
boolean |
isNull()
|
boolean |
isNull(int fieldNum)
Find out if a given field is null. |
void |
reference(Tuple t)
Make this tuple reference the contents of another. |
void |
set(int fieldNum,
Object val)
Set the value in a given field. |
void |
setNull(boolean isNull)
|
int |
size()
Find the size of the tuple. |
String |
toDelimitedString(String delim)
Write a tuple of atomic values into a string. |
Methods inherited from interface org.apache.hadoop.io.Writable |
---|
readFields, write |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
static final byte NULL
static final byte NOTNULL
Method Detail |
---|
void reference(Tuple t)
t
- Tuple to reference.int size()
boolean isNull(int fieldNum) throws ExecException
fieldNum
- Number of field to check for null.
ExecException
- if the field number given is greater
than or equal to the number of fields in the tuple.byte getType(int fieldNum) throws ExecException
fieldNum
- Number of field to get the type for.
ExecException
- if the field number is greater than or equal to
the number of fields in the tuple.Object get(int fieldNum) throws ExecException
fieldNum
- Number of the field to get the value for.
ExecException
- if the field number is greater than or equal to
the number of fields in the tuple.List<Object> getAll()
void set(int fieldNum, Object val) throws ExecException
fieldNum
- Number of the field to set the value for.val
- Object to put in the indicated field.
ExecException
- if the field number is greater than or equal to
the number of fields in the tuple.void append(Object val)
val
- Object to append to the tuple.long getMemorySize()
String toDelimitedString(String delim) throws ExecException
delim
- Delimiter to use in the string.
ExecException
- if a non-atomic value is found.boolean isNull()
void setNull(boolean isNull)
isNull
- boolean indicating whether this tuple is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |