|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pig.data.DefaultTuple
public class DefaultTuple
A default implementation of Tuple. This class will be created by the DefaultTupleFactory.
| Nested Class Summary | |
|---|---|
static class |
DefaultTuple.DefaultTupleRawComparator
|
| Field Summary | |
|---|---|
protected boolean |
isNull
|
protected List<Object> |
mFields
|
| Fields inherited from interface org.apache.pig.data.Tuple |
|---|
NOTNULL, NULL |
| Constructor Summary | |
|---|---|
DefaultTuple()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
append(Object val)
Append a field to a tuple. |
int |
compareTo(Object other)
|
boolean |
equals(Object other)
|
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. |
static Class<? extends TupleRawComparator> |
getComparatorClass()
|
long |
getMemorySize()
Determine the size of tuple in memory. |
byte |
getType(int fieldNum)
Find the type of a given field. |
int |
hashCode()
|
boolean |
isNull()
Determine if this entire tuple (not any particular field) is null. |
boolean |
isNull(int fieldNum)
Find out if a given field is null. |
void |
readFields(DataInput in)
|
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)
Mark this entire tuple as null or not null. |
int |
size()
Find the size of the tuple. |
String |
toDelimitedString(String delim)
Write a tuple of atomic values into a string. |
String |
toString()
|
void |
write(DataOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean isNull
protected List<Object> mFields
| Constructor Detail |
|---|
public DefaultTuple()
| Method Detail |
|---|
public void reference(Tuple t)
reference in interface Tuplet - Tuple to reference.public int size()
size in interface Tuple
public boolean isNull(int fieldNum)
throws ExecException
isNull in interface TuplefieldNum - 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.
public byte getType(int fieldNum)
throws ExecException
getType in interface TuplefieldNum - 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.
public Object get(int fieldNum)
throws ExecException
get in interface TuplefieldNum - 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.public List<Object> getAll()
getAll in interface Tuple
public void set(int fieldNum,
Object val)
throws ExecException
set in interface TuplefieldNum - 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.public void append(Object val)
append in interface Tupleval - Object to append to the tuple.public long getMemorySize()
getMemorySize in interface Tuple
public String toDelimitedString(String delim)
throws ExecException
toDelimitedString in interface Tupledelim - Delimiter to use in the string.
ExecException - if a non-atomic value is found.public String toString()
toString in class Objectpublic int compareTo(Object other)
compareTo in interface Comparablepublic boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Object
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.WritableIOException
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic boolean isNull()
Tuple
isNull in interface Tuplepublic void setNull(boolean isNull)
Tuple
setNull in interface TupleisNull - boolean indicating whether this tuple is nullpublic static Class<? extends TupleRawComparator> getComparatorClass()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||