|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.data.AbstractTuple
org.apache.pig.data.TargetedTuple
public class TargetedTuple
A tuple composed with the operators to which it needs be attached
Field Summary | |
---|---|
protected boolean |
isNull
|
List<OperatorKey> |
targetOps
|
Fields inherited from interface org.apache.pig.data.Tuple |
---|
NOTNULL, NULL |
Constructor Summary | |
---|---|
TargetedTuple()
|
|
TargetedTuple(Tuple t,
List<OperatorKey> targetOps)
|
Method Summary | |
---|---|
void |
append(Object val)
Append a field to a tuple. |
int |
compareTo(Object o)
|
boolean |
equals(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. |
List<OperatorKey> |
getTargetOps()
|
byte |
getType(int fieldNum)
Find the type of a given field. |
int |
hashCode()
|
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 |
setTargetOps(List<OperatorKey> targetOps)
|
int |
size()
Find the size of the tuple. |
String |
toString()
|
Tuple |
toTuple()
|
void |
write(DataOutput out)
|
Methods inherited from class org.apache.pig.data.AbstractTuple |
---|
isNull, iterator, toDelimitedString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public List<OperatorKey> targetOps
protected boolean isNull
Constructor Detail |
---|
public TargetedTuple()
public TargetedTuple(Tuple t, List<OperatorKey> targetOps)
Method Detail |
---|
public String toString()
toString
in class AbstractTuple
public void write(DataOutput out) throws IOException
IOException
public void readFields(DataInput in) throws IOException
IOException
public Tuple toTuple()
public List<OperatorKey> getTargetOps()
public void setTargetOps(List<OperatorKey> targetOps)
public void append(Object val)
Tuple
TupleFactory.newTuple(int)
and then fill in the values with
Tuple.set(int, Object)
, rather
than construct it with TupleFactory.newTuple()
and append values.
val
- Object to append to the tuple.public Object get(int fieldNum) throws ExecException
Tuple
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.public List<Object> getAll()
Tuple
public long getMemorySize()
Tuple
public byte getType(int fieldNum) throws ExecException
AbstractTuple
getType
in interface Tuple
getType
in class AbstractTuple
fieldNum
- 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 void reference(Tuple t)
Tuple
reference
in interface Tuple
reference
in class AbstractTuple
t
- Tuple to reference.public void set(int fieldNum, Object val) throws ExecException
Tuple
TupleFactory.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.
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.public int size()
Tuple
public int compareTo(Object o)
public boolean equals(Object o)
equals
in class AbstractTuple
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |