@InterfaceAudience.Public @InterfaceStability.Unstable public abstract class AppendableSchemaTuple<T extends AppendableSchemaTuple<T>> extends SchemaTuple<T>
SchemaTuple.SchemaTupleQuickGenerator<A>| Constructor and Description |
|---|
AppendableSchemaTuple() |
| Modifier and Type | Method and Description |
|---|---|
void |
append(Object val)
Append a field to a tuple.
|
protected int |
appendedFieldsSize() |
protected int |
compareTo(SchemaTuple<?> t,
boolean checkType) |
protected int |
compareToSpecific(T t) |
Object |
get(int fieldNum)
Get the value in a given field.
|
protected Object |
getAppendedField(int i) |
Tuple |
getAppendedFields() |
long |
getMemorySize()
This adds the additional overhead of the append Tuple
|
byte |
getType(int fieldNum)
Find the type of a given field.
|
protected Object |
getTypeAwareBase(int fieldNum,
String type) |
int |
hashCode() |
protected boolean |
isAppendedFieldsNull() |
boolean |
isNull(int fieldNum)
Find out if a given field is null.
|
void |
readFields(DataInput in) |
void |
set(int fieldNum,
Object val)
Set the value in a given field.
|
SchemaTuple<T> |
set(List<Object> l) |
protected SchemaTuple<T> |
set(SchemaTuple<?> t,
boolean checkType) |
protected void |
setAppendedFields(Tuple t) |
protected SchemaTuple<T> |
setSpecific(T t) |
protected void |
setTypeAwareBase(int fieldNum,
Object val,
String type) |
int |
size()
Find the size of the tuple.
|
protected void |
writeElements(DataOutput out)
This method is responsible for writing everything contained by the Tuple.
|
box, box, box, box, box, box, box, box, box, box, box, box, box, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compare, compareElementAtPos, compareNull, compareNull, compareSize, compareTo, compareTo, compareTo, compareTo, compareWithElementAtPos, compareWithElementAtPos, compareWithElementAtPos, compareWithElementAtPos, compareWithElementAtPos, compareWithElementAtPos, compareWithElementAtPos, compareWithElementAtPos, compareWithElementAtPos, compareWithElementAtPos, compareWithElementAtPos, compareWithElementAtPos, compareWithElementAtPos, equals, generatedCodeCompareTo, generatedCodeCompareToSpecific, generatedCodeGetBigDecimal, generatedCodeGetBigInteger, generatedCodeGetBoolean, generatedCodeGetBytes, generatedCodeGetDataBag, generatedCodeGetDateTime, generatedCodeGetDouble, generatedCodeGetField, generatedCodeGetFloat, generatedCodeGetInt, generatedCodeGetLong, generatedCodeGetMap, generatedCodeGetString, generatedCodeGetTuple, generatedCodeHashCode, generatedCodeNullsArray, generatedCodeReadFields, generatedCodeSet, generatedCodeSetBigDecimal, generatedCodeSetBigInteger, generatedCodeSetBoolean, generatedCodeSetBytes, generatedCodeSetDataBag, generatedCodeSetDateTime, generatedCodeSetDouble, generatedCodeSetField, generatedCodeSetFloat, generatedCodeSetInt, generatedCodeSetIterator, generatedCodeSetLong, generatedCodeSetMap, generatedCodeSetSpecific, generatedCodeSetString, generatedCodeSetTuple, generatedCodeSize, generatedCodeWriteElements, getAll, getBigDecimal, getBigInteger, getBoolean, getBytes, getDataBag, getDateTime, getDouble, getFloat, getGeneratedCodeFieldType, getGeneratedCodeMemorySize, getInt, getLong, getMap, getQuickGenerator, getSchemaString, getSchemaTupleIdentifier, getString, getTuple, hashCodePiece, hashCodePiece, hashCodePiece, hashCodePiece, hashCodePiece, hashCodePiece, hashCodePiece, hashCodePiece, hashCodePiece, hashCodePiece, hashCodePiece, hashCodePiece, hashCodePiece, isGeneratedCodeFieldNull, isSpecificSchemaTuple, read, read, read, read, read, read, read, read, read, read, read, reference, returnUnlessNull, returnUnlessNull, returnUnlessNull, returnUnlessNull, returnUnlessNull, returnUnlessNull, returnUnlessNull, returnUnlessNull, returnUnlessNull, returnUnlessNull, returnUnlessNull, returnUnlessNull, returnUnlessNull, schemaSize, set, set, set, setAndCatch, setAndCatch, setBigDecimal, setBigInteger, setBoolean, setBytes, setDataBag, setDateTime, setDouble, setFloat, setInt, setLong, setMap, setString, setTuple, staticSchemaGen, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unbox, unboxBigDecimal, unboxBigInteger, unboxBoolean, unboxBytes, unboxDataBag, unboxDateTime, unboxDouble, unboxFloat, unboxInt, unboxLong, unboxMap, unboxString, unboxTuple, write, write, write, write, write, write, write, write, write, write, write, write, write, writeiterator, toDelimitedString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetSchematoDelimitedStringforEach, iterator, spliteratorpublic 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 Tupleappend in class SchemaTuple<T extends AppendableSchemaTuple<T>>val - Object to append to the tuple.protected int appendedFieldsSize()
protected boolean isAppendedFieldsNull()
protected Object getAppendedField(int i) throws ExecException
ExecExceptionpublic Tuple getAppendedFields()
protected void setAppendedFields(Tuple t)
public long getMemorySize()
getMemorySize in interface TuplegetMemorySize in class SchemaTuple<T extends AppendableSchemaTuple<T>>protected SchemaTuple<T> set(SchemaTuple<?> t, boolean checkType) throws ExecException
set in class SchemaTuple<T extends AppendableSchemaTuple<T>>ExecExceptionprotected SchemaTuple<T> setSpecific(T t)
setSpecific in class SchemaTuple<T extends AppendableSchemaTuple<T>>public SchemaTuple<T> set(List<Object> l) throws ExecException
set in class SchemaTuple<T extends AppendableSchemaTuple<T>>ExecExceptionprotected int compareTo(SchemaTuple<?> t, boolean checkType)
compareTo in class SchemaTuple<T extends AppendableSchemaTuple<T>>protected int compareToSpecific(T t)
compareToSpecific in class SchemaTuple<T extends AppendableSchemaTuple<T>>public int hashCode()
hashCode in class SchemaTuple<T extends AppendableSchemaTuple<T>>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 Tupleset in class SchemaTuple<T extends AppendableSchemaTuple<T>>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 Object get(int fieldNum) throws ExecException
Tupleget in interface Tupleget in class SchemaTuple<T extends AppendableSchemaTuple<T>>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 boolean isNull(int fieldNum)
throws ExecException
AbstractTupleisNull in interface TupleisNull in class SchemaTuple<T extends AppendableSchemaTuple<T>>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.public byte getType(int fieldNum)
throws ExecException
AbstractTuplegetType in interface TuplegetType in class SchemaTuple<T extends AppendableSchemaTuple<T>>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.protected void setTypeAwareBase(int fieldNum,
Object val,
String type)
throws ExecException
setTypeAwareBase in class SchemaTuple<T extends AppendableSchemaTuple<T>>ExecExceptionprotected Object getTypeAwareBase(int fieldNum, String type) throws ExecException
getTypeAwareBase in class SchemaTuple<T extends AppendableSchemaTuple<T>>ExecExceptionprotected void writeElements(DataOutput out) throws IOException
SchemaTuplewriteElements in class SchemaTuple<T extends AppendableSchemaTuple<T>>IOExceptionpublic int size()
Tuplesize in interface Tuplesize in class SchemaTuple<T extends AppendableSchemaTuple<T>>public void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritablereadFields in class SchemaTuple<T extends AppendableSchemaTuple<T>>IOExceptionCopyright © 2007-2017 The Apache Software Foundation