@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, write
iterator, toDelimitedString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getSchema
toDelimitedString
forEach, iterator, spliterator
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.append
in interface Tuple
append
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
ExecException
public Tuple getAppendedFields()
protected void setAppendedFields(Tuple t)
public long getMemorySize()
getMemorySize
in interface Tuple
getMemorySize
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>>
ExecException
protected 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>>
ExecException
protected 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
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.set
in interface Tuple
set
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
Tuple
get
in interface Tuple
get
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
AbstractTuple
isNull
in interface Tuple
isNull
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
AbstractTuple
getType
in interface Tuple
getType
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>>
ExecException
protected Object getTypeAwareBase(int fieldNum, String type) throws ExecException
getTypeAwareBase
in class SchemaTuple<T extends AppendableSchemaTuple<T>>
ExecException
protected void writeElements(DataOutput out) throws IOException
SchemaTuple
writeElements
in class SchemaTuple<T extends AppendableSchemaTuple<T>>
IOException
public int size()
Tuple
size
in interface Tuple
size
in class SchemaTuple<T extends AppendableSchemaTuple<T>>
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class SchemaTuple<T extends AppendableSchemaTuple<T>>
IOException
Copyright © 2007-2017 The Apache Software Foundation