|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pig.pen.util.ExampleTuple
public class ExampleTuple
| Field Summary | |
|---|---|
boolean |
omittable
|
boolean |
synthetic
|
| Fields inherited from interface org.apache.pig.data.Tuple |
|---|
NOTNULL, NULL |
| Constructor Summary | |
|---|---|
ExampleTuple()
|
|
ExampleTuple(Object expr)
|
|
ExampleTuple(Tuple t)
|
|
| Method Summary | |
|---|---|
void |
append(Object val)
Append a field to a tuple. |
int |
compareTo(Object o)
|
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()
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()
|
Tuple |
toTuple()
|
void |
write(DataOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public boolean synthetic
public boolean omittable
| Constructor Detail |
|---|
public ExampleTuple()
public ExampleTuple(Object expr)
public ExampleTuple(Tuple t)
| Method Detail |
|---|
public String toString()
toString 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 Tuple toTuple()
public void append(Object val)
TupleTupleFactory.newTuple(int) and then fill in the values with
Tuple.set(int, Object), rather
than construct it with TupleFactory.newTuple() and append values.
append in interface Tupleval - Object to append to the tuple.
public Object get(int fieldNum)
throws ExecException
Tuple
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()
Tuple
getAll in interface Tuplepublic long getMemorySize()
Tuple
getMemorySize in interface Tuple
public byte getType(int fieldNum)
throws ExecException
Tuple
getType in interface TuplefieldNum - Number of field to get the type for.
DataType. If the field is null, then DataType.UNKNOWN
will be returned.
ExecException - if the field number is greater than or equal to
the number of fields in the tuple.
public boolean isNull(int fieldNum)
throws ExecException
Tuple
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 boolean isNull()
Tuple
isNull in interface Tuplepublic void reference(Tuple t)
Tuple
reference in interface Tuplet - Tuple to reference.
public void set(int fieldNum,
Object val)
throws ExecException
TupleTupleFactory.newTuple(int) with an
argument greater than the fieldNum being passed here. This call will
not automatically expand the tuple size. That is if you called
TupleFactory.newTuple(int) with a 2, it is okay to call
this function with a 1, but not with a 2 or greater.
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 setNull(boolean isNull)
Tuple
setNull in interface TupleisNull - boolean indicating whether this tuple is nullpublic int size()
Tuple
size in interface Tuple
public String toDelimitedString(String delim)
throws ExecException
Tuple
toDelimitedString in interface Tupledelim - Delimiter to use in the string.
ExecException - if a non-atomic value is found.public int compareTo(Object o)
compareTo in interface Comparable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||