@InterfaceAudience.Public @InterfaceStability.Unstable public abstract class SchemaTuple<T extends SchemaTuple<T>> extends AbstractTuple implements TypeAwareTuple
| Modifier and Type | Class and Description |
|---|---|
static class |
SchemaTuple.SchemaTupleQuickGenerator<A> |
| Constructor and Description |
|---|
SchemaTuple() |
| Modifier and Type | Method and Description |
|---|---|
void |
append(Object val)
Append a field to a tuple.
|
protected BigDecimal |
box(BigDecimal v) |
protected BigInteger |
box(BigInteger v) |
protected Boolean |
box(boolean v) |
protected DataByteArray |
box(byte[] v) |
protected DataBag |
box(DataBag v) |
protected org.joda.time.DateTime |
box(org.joda.time.DateTime v) |
protected Double |
box(double v) |
protected Float |
box(float v) |
protected Integer |
box(int v) |
protected Long |
box(long v) |
protected Map<String,Object> |
box(Map<String,Object> v) |
protected String |
box(String v) |
protected Tuple |
box(Tuple t) |
protected int |
compare(BigDecimal val,
BigDecimal themVal) |
protected int |
compare(BigInteger val,
BigInteger themVal) |
protected int |
compare(boolean usNull,
BigDecimal usVal,
boolean themNull,
BigDecimal themVal) |
protected int |
compare(boolean usNull,
BigInteger usVal,
boolean themNull,
BigInteger themVal) |
protected int |
compare(boolean val,
boolean themVal) |
protected int |
compare(boolean usNull,
boolean usVal,
boolean themNull,
boolean themVal) |
protected int |
compare(boolean usNull,
byte[] usVal,
boolean themNull,
byte[] themVal) |
protected int |
compare(boolean usNull,
DataBag usVal,
boolean themNull,
DataBag themVal) |
protected int |
compare(boolean usNull,
org.joda.time.DateTime usVal,
boolean themNull,
org.joda.time.DateTime themVal) |
protected int |
compare(boolean usNull,
double usVal,
boolean themNull,
double themVal) |
protected int |
compare(boolean usNull,
float usVal,
boolean themNull,
float themVal) |
protected int |
compare(boolean usNull,
int usVal,
boolean themNull,
int themVal) |
protected int |
compare(boolean usNull,
long usVal,
boolean themNull,
long themVal) |
protected int |
compare(boolean usNull,
Map<String,Object> usVal,
boolean themNull,
Map<String,Object> themVal) |
protected int |
compare(boolean usNull,
SchemaTuple<?> usVal,
boolean themNull,
Object themVal) |
protected int |
compare(boolean usNull,
String usVal,
boolean themNull,
String themVal) |
protected int |
compare(byte[] val,
byte[] themVal) |
protected int |
compare(DataBag val,
DataBag themVal) |
protected int |
compare(org.joda.time.DateTime val,
org.joda.time.DateTime themVal) |
protected int |
compare(double val,
double themVal) |
int |
compare(float val,
float themVal) |
protected int |
compare(int val,
int themVal) |
protected int |
compare(long val,
long themVal) |
protected int |
compare(Map<String,Object> val,
Map<String,Object> themVal) |
protected int |
compare(String val,
String themVal) |
protected int |
compareElementAtPos(int val,
SchemaTuple<?> t,
int pos) |
protected int |
compareNull(boolean usNull,
boolean themNull) |
protected int |
compareNull(boolean usNull,
Tuple t,
int pos) |
protected int |
compareSize(Tuple t) |
int |
compareTo(Object other) |
int |
compareTo(SchemaTuple<?> t) |
protected int |
compareTo(SchemaTuple<?> t,
boolean checkType) |
int |
compareTo(Tuple t) |
protected int |
compareTo(Tuple t,
boolean checkType) |
protected int |
compareToSpecific(T t) |
protected int |
compareWithElementAtPos(boolean isNull,
BigDecimal val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
BigInteger val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
boolean val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
byte[] val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
DataBag val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
org.joda.time.DateTime val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
double val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
float val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
int val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
long val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
Map<String,Object> val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
SchemaTuple<?> val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
String val,
SchemaTuple<?> t,
int pos) |
boolean |
equals(Object other) |
protected abstract int |
generatedCodeCompareTo(SchemaTuple<?> t,
boolean checkType) |
protected abstract int |
generatedCodeCompareToSpecific(T t) |
protected abstract BigDecimal |
generatedCodeGetBigDecimal(int fieldNum) |
protected abstract BigInteger |
generatedCodeGetBigInteger(int fieldNum) |
protected abstract boolean |
generatedCodeGetBoolean(int fieldNum) |
protected abstract byte[] |
generatedCodeGetBytes(int fieldNum) |
protected abstract DataBag |
generatedCodeGetDataBag(int fieldNum) |
protected abstract org.joda.time.DateTime |
generatedCodeGetDateTime(int fieldNum) |
protected abstract double |
generatedCodeGetDouble(int fieldNum) |
abstract Object |
generatedCodeGetField(int fieldNum) |
protected abstract float |
generatedCodeGetFloat(int fieldNum) |
protected abstract int |
generatedCodeGetInt(int fieldNum) |
protected abstract long |
generatedCodeGetLong(int fieldNum) |
protected abstract Map<String,Object> |
generatedCodeGetMap(int fieldNum) |
protected abstract String |
generatedCodeGetString(int fieldNum) |
protected abstract Tuple |
generatedCodeGetTuple(int fieldNum) |
protected abstract int |
generatedCodeHashCode() |
protected abstract boolean[] |
generatedCodeNullsArray() |
protected abstract void |
generatedCodeReadFields(DataInput in,
boolean[] nulls) |
protected abstract SchemaTuple<T> |
generatedCodeSet(SchemaTuple<?> t,
boolean checkType) |
protected abstract void |
generatedCodeSetBigDecimal(int fieldNum,
BigDecimal val) |
protected abstract void |
generatedCodeSetBigInteger(int fieldNum,
BigInteger val) |
protected abstract void |
generatedCodeSetBoolean(int fieldNum,
boolean val) |
protected abstract void |
generatedCodeSetBytes(int fieldNum,
byte[] val) |
protected abstract void |
generatedCodeSetDataBag(int fieldNum,
DataBag val) |
protected abstract void |
generatedCodeSetDateTime(int fieldNum,
org.joda.time.DateTime val) |
protected abstract void |
generatedCodeSetDouble(int fieldNum,
double val) |
abstract void |
generatedCodeSetField(int fieldNum,
Object val) |
protected abstract void |
generatedCodeSetFloat(int fieldNum,
float val) |
protected abstract void |
generatedCodeSetInt(int fieldNum,
int val) |
protected abstract void |
generatedCodeSetIterator(Iterator<Object> l) |
protected abstract void |
generatedCodeSetLong(int fieldNum,
long val) |
protected abstract void |
generatedCodeSetMap(int fieldNum,
Map<String,Object> val) |
protected abstract SchemaTuple<T> |
generatedCodeSetSpecific(T t) |
protected abstract void |
generatedCodeSetString(int fieldNum,
String val) |
protected abstract void |
generatedCodeSetTuple(int fieldNum,
Tuple val) |
protected abstract int |
generatedCodeSize() |
protected abstract void |
generatedCodeWriteElements(DataOutput out) |
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.
|
BigDecimal |
getBigDecimal(int fieldNum) |
BigInteger |
getBigInteger(int fieldNum) |
boolean |
getBoolean(int fieldNum) |
byte[] |
getBytes(int fieldNum) |
DataBag |
getDataBag(int fieldNum) |
org.joda.time.DateTime |
getDateTime(int fieldNum) |
double |
getDouble(int fieldNum) |
float |
getFloat(int fieldNum) |
abstract byte |
getGeneratedCodeFieldType(int fieldNum) |
protected abstract long |
getGeneratedCodeMemorySize() |
int |
getInt(int fieldNum) |
long |
getLong(int fieldNum) |
Map<String,Object> |
getMap(int fieldNum) |
long |
getMemorySize()
This only accounts for the size of members (adjusting for word alignment).
|
abstract SchemaTuple.SchemaTupleQuickGenerator<T> |
getQuickGenerator()
This is a mechanism which allows the SchemaTupleFactory to
get around having to use reflection.
|
String |
getSchemaString() |
abstract int |
getSchemaTupleIdentifier()
This method will return the identifier that the generated code
was generated with.
|
String |
getString(int fieldNum) |
Tuple |
getTuple(int fieldNum) |
byte |
getType(int fieldNum)
Find the type of a given field.
|
protected Object |
getTypeAwareBase(int fieldNum,
String type) |
int |
hashCode() |
protected int |
hashCodePiece(int hash,
BigDecimal v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
BigInteger v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
boolean v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
byte[] v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
DataBag v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
org.joda.time.DateTime v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
double v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
float v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
int v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
long v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
Map<String,Object> v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
String v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
Tuple v,
boolean isNull) |
abstract boolean |
isGeneratedCodeFieldNull(int fieldNum) |
boolean |
isNull(int fieldNum)
Find out if a given field is null.
|
abstract boolean |
isSpecificSchemaTuple(Object o) |
protected static BigDecimal |
read(DataInput in,
BigDecimal v) |
protected static BigInteger |
read(DataInput in,
BigInteger v) |
protected static byte[] |
read(DataInput in,
byte[] v) |
protected static DataBag |
read(DataInput in,
DataBag v) |
protected static org.joda.time.DateTime |
read(DataInput in,
org.joda.time.DateTime v) |
protected static double |
read(DataInput in,
double v) |
protected static float |
read(DataInput in,
float v) |
protected static int |
read(DataInput in,
int v) |
protected static long |
read(DataInput in,
long v) |
protected static Map<String,Object> |
read(DataInput in,
Map<String,Object> v) |
protected static String |
read(DataInput in,
String v) |
void |
readFields(DataInput in) |
void |
reference(Tuple t)
Make this tuple reference the contents of another.
|
protected BigDecimal |
returnUnlessNull(boolean isNull,
BigDecimal val) |
protected BigInteger |
returnUnlessNull(boolean isNull,
BigInteger val) |
protected boolean |
returnUnlessNull(boolean isNull,
boolean val) |
protected byte[] |
returnUnlessNull(boolean isNull,
byte[] val) |
protected DataBag |
returnUnlessNull(boolean isNull,
DataBag val) |
protected org.joda.time.DateTime |
returnUnlessNull(boolean isNull,
org.joda.time.DateTime val) |
protected double |
returnUnlessNull(boolean isNull,
double val) |
protected float |
returnUnlessNull(boolean isNull,
float val) |
protected int |
returnUnlessNull(boolean isNull,
int val) |
protected long |
returnUnlessNull(boolean isNull,
long val) |
protected Map<String,Object> |
returnUnlessNull(boolean isNull,
Map<String,Object> val) |
protected String |
returnUnlessNull(boolean isNull,
String val) |
protected Tuple |
returnUnlessNull(boolean isNull,
Tuple val) |
protected abstract int |
schemaSize() |
void |
set(int fieldNum,
Object val)
Set the value in a given field.
|
SchemaTuple<T> |
set(List<Object> l) |
SchemaTuple<T> |
set(SchemaTuple<?> t) |
protected SchemaTuple<T> |
set(SchemaTuple<?> t,
boolean checkType) |
SchemaTuple<T> |
set(Tuple t) |
protected SchemaTuple<T> |
set(Tuple t,
boolean checkType) |
void |
setAndCatch(SchemaTuple<?> t) |
void |
setAndCatch(Tuple t) |
void |
setBigDecimal(int fieldNum,
BigDecimal val) |
void |
setBigInteger(int fieldNum,
BigInteger val) |
void |
setBoolean(int fieldNum,
boolean val) |
void |
setBytes(int fieldNum,
byte[] val) |
void |
setDataBag(int fieldNum,
DataBag val) |
void |
setDateTime(int fieldNum,
org.joda.time.DateTime val) |
void |
setDouble(int fieldNum,
double val) |
void |
setFloat(int fieldNum,
float val) |
void |
setInt(int fieldNum,
int val) |
void |
setLong(int fieldNum,
long val) |
void |
setMap(int fieldNum,
Map<String,Object> val) |
protected SchemaTuple<T> |
setSpecific(T t) |
void |
setString(int fieldNum,
String val) |
void |
setTuple(int fieldNum,
Tuple val) |
protected void |
setTypeAwareBase(int fieldNum,
Object val,
String type) |
int |
size()
Find the size of the tuple.
|
protected static Schema |
staticSchemaGen(String s) |
protected boolean |
unbox(Boolean v) |
protected DataBag |
unbox(DataBag v) |
protected byte[] |
unbox(DataByteArray v) |
protected org.joda.time.DateTime |
unbox(org.joda.time.DateTime v) |
protected double |
unbox(Double v) |
protected float |
unbox(Float v) |
protected int |
unbox(Integer v) |
protected long |
unbox(Long v) |
protected Map<String,Object> |
unbox(Map<String,Object> v) |
protected BigDecimal |
unbox(Object v,
BigDecimal t) |
protected BigInteger |
unbox(Object v,
BigInteger t) |
protected boolean |
unbox(Object v,
boolean t) |
protected byte[] |
unbox(Object v,
byte[] t) |
protected DataBag |
unbox(Object v,
DataBag t) |
protected org.joda.time.DateTime |
unbox(Object v,
org.joda.time.DateTime t) |
protected double |
unbox(Object v,
double t) |
protected float |
unbox(Object v,
float t) |
protected int |
unbox(Object v,
int t) |
protected long |
unbox(Object v,
long t) |
protected Map<String,Object> |
unbox(Object v,
Map<String,Object> t) |
protected String |
unbox(Object v,
String t) |
protected Tuple |
unbox(Object v,
Tuple t) |
BigDecimal |
unboxBigDecimal(Object val) |
BigInteger |
unboxBigInteger(Object val) |
boolean |
unboxBoolean(Object val) |
byte[] |
unboxBytes(Object val) |
protected DataBag |
unboxDataBag(Object val) |
org.joda.time.DateTime |
unboxDateTime(Object val) |
double |
unboxDouble(Object val) |
float |
unboxFloat(Object val) |
int |
unboxInt(Object val) |
long |
unboxLong(Object val) |
protected Map<String,Object> |
unboxMap(Object val) |
String |
unboxString(Object val) |
protected Tuple |
unboxTuple(Object val) |
void |
write(DataOutput out) |
protected static void |
write(DataOutput out,
BigDecimal v) |
protected static void |
write(DataOutput out,
BigInteger v) |
protected void |
write(DataOutput out,
boolean writeIdentifiers) |
protected static void |
write(DataOutput out,
byte[] v) |
protected static void |
write(DataOutput out,
DataBag v) |
protected static void |
write(DataOutput out,
org.joda.time.DateTime v) |
protected static void |
write(DataOutput out,
double v) |
protected static void |
write(DataOutput out,
float v) |
protected static void |
write(DataOutput out,
int v) |
protected static void |
write(DataOutput out,
long v) |
protected static void |
write(DataOutput out,
Map<String,Object> v) |
protected static void |
write(DataOutput out,
SchemaTuple<?> t) |
protected static void |
write(DataOutput out,
String v) |
protected void |
writeElements(DataOutput out)
This method is responsible for writing everything contained by the Tuple.
|
iterator, 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.public long getMemorySize()
getMemorySize in interface Tupleprotected abstract long getGeneratedCodeMemorySize()
public abstract int getSchemaTupleIdentifier()
protected abstract int schemaSize()
public String getSchemaString()
protected SchemaTuple<T> set(SchemaTuple<?> t, boolean checkType) throws ExecException
ExecExceptionprotected abstract SchemaTuple<T> generatedCodeSet(SchemaTuple<?> t, boolean checkType) throws ExecException
ExecExceptionprotected SchemaTuple<T> setSpecific(T t)
protected abstract SchemaTuple<T> generatedCodeSetSpecific(T t)
public SchemaTuple<T> set(Tuple t) throws ExecException
ExecExceptionprotected SchemaTuple<T> set(Tuple t, boolean checkType) throws ExecException
ExecExceptionpublic SchemaTuple<T> set(SchemaTuple<?> t) throws ExecException
ExecExceptionpublic SchemaTuple<T> set(List<Object> l) throws ExecException
ExecExceptionprotected abstract void generatedCodeSetIterator(Iterator<Object> l) throws ExecException
ExecExceptionprotected void write(DataOutput out, boolean writeIdentifiers) throws IOException
IOExceptionprotected static void write(DataOutput out, DataBag v) throws IOException
IOExceptionprotected static void write(DataOutput out, Map<String,Object> v) throws IOException
IOExceptionprotected static void write(DataOutput out, int v) throws IOException
IOExceptionprotected static void write(DataOutput out, long v) throws IOException
IOExceptionprotected static void write(DataOutput out, float v) throws IOException
IOExceptionprotected static void write(DataOutput out, double v) throws IOException
IOExceptionprotected static void write(DataOutput out, org.joda.time.DateTime v) throws IOException
IOExceptionprotected static void write(DataOutput out, BigDecimal v) throws IOException
IOExceptionprotected static void write(DataOutput out, BigInteger v) throws IOException
IOExceptionprotected static void write(DataOutput out, byte[] v) throws IOException
IOExceptionprotected static void write(DataOutput out, String v) throws IOException
IOExceptionprotected static void write(DataOutput out, SchemaTuple<?> t) throws IOException
IOExceptionprotected static DataBag read(DataInput in, DataBag v) throws IOException
IOExceptionprotected static Map<String,Object> read(DataInput in, Map<String,Object> v) throws IOException
IOExceptionprotected static int read(DataInput in, int v) throws IOException
IOExceptionprotected static long read(DataInput in, long v) throws IOException
IOExceptionprotected static float read(DataInput in, float v) throws IOException
IOExceptionprotected static double read(DataInput in, double v) throws IOException
IOExceptionprotected static org.joda.time.DateTime read(DataInput in, org.joda.time.DateTime v) throws IOException
IOExceptionprotected static BigDecimal read(DataInput in, BigDecimal v) throws IOException
IOExceptionprotected static BigInteger read(DataInput in, BigInteger v) throws IOException
IOExceptionprotected static String read(DataInput in, String v) throws IOException
IOExceptionprotected static byte[] read(DataInput in, byte[] v) throws IOException
IOExceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic void reference(Tuple t)
Tuplereference in interface Tuplereference in class AbstractTuplet - Tuple to reference.public List<Object> getAll()
Tuplepublic abstract boolean isSpecificSchemaTuple(Object o)
public int compareTo(Object other)
compareTo in interface Comparablepublic int compareTo(Tuple t)
protected int compareTo(Tuple t, boolean checkType)
public int compareTo(SchemaTuple<?> t)
protected int compareTo(SchemaTuple<?> t, boolean checkType)
protected abstract int generatedCodeCompareTo(SchemaTuple<?> t, boolean checkType)
protected int compareToSpecific(T t)
protected abstract int generatedCodeCompareToSpecific(T t)
public boolean equals(Object other)
equals in class AbstractTupleprotected byte[] unbox(Object v, byte[] t)
protected int unbox(Object v, int t)
protected long unbox(Object v, long t)
protected float unbox(Object v, float t)
protected double unbox(Object v, double t)
protected boolean unbox(Object v, boolean t)
protected org.joda.time.DateTime unbox(Object v, org.joda.time.DateTime t)
protected BigDecimal unbox(Object v, BigDecimal t)
protected BigInteger unbox(Object v, BigInteger t)
protected byte[] unbox(DataByteArray v)
protected int unbox(Integer v)
protected long unbox(Long v)
protected float unbox(Float v)
protected double unbox(Double v)
protected boolean unbox(Boolean v)
protected org.joda.time.DateTime unbox(org.joda.time.DateTime v)
protected DataByteArray box(byte[] v)
protected Integer box(int v)
protected Long box(long v)
protected Float box(float v)
protected Double box(double v)
protected Boolean box(boolean v)
protected org.joda.time.DateTime box(org.joda.time.DateTime v)
protected BigDecimal box(BigDecimal v)
protected BigInteger box(BigInteger v)
protected int hashCodePiece(int hash,
int v,
boolean isNull)
protected int hashCodePiece(int hash,
long v,
boolean isNull)
protected int hashCodePiece(int hash,
float v,
boolean isNull)
protected int hashCodePiece(int hash,
double v,
boolean isNull)
protected int hashCodePiece(int hash,
boolean v,
boolean isNull)
protected int hashCodePiece(int hash,
org.joda.time.DateTime v,
boolean isNull)
protected int hashCodePiece(int hash,
BigDecimal v,
boolean isNull)
protected int hashCodePiece(int hash,
BigInteger v,
boolean isNull)
protected int hashCodePiece(int hash,
byte[] v,
boolean isNull)
protected int hashCodePiece(int hash,
String v,
boolean isNull)
protected int hashCodePiece(int hash,
Tuple v,
boolean isNull)
protected int hashCodePiece(int hash,
DataBag v,
boolean isNull)
protected abstract int generatedCodeHashCode()
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 abstract void generatedCodeSetField(int fieldNum,
Object val)
throws ExecException
ExecExceptionpublic Object get(int fieldNum) throws ExecException
Tupleget 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 abstract Object generatedCodeGetField(int fieldNum) throws ExecException
ExecExceptionpublic boolean isNull(int fieldNum)
throws ExecException
AbstractTupleisNull in interface TupleisNull in class AbstractTuplefieldNum - 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 abstract boolean isGeneratedCodeFieldNull(int fieldNum)
throws ExecException
ExecExceptionpublic byte getType(int fieldNum)
throws ExecException
AbstractTuplegetType in interface TuplegetType in class AbstractTuplefieldNum - 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 abstract byte getGeneratedCodeFieldType(int fieldNum)
throws ExecException
ExecExceptionprotected void setTypeAwareBase(int fieldNum,
Object val,
String type)
throws ExecException
ExecExceptionprotected Object getTypeAwareBase(int fieldNum, String type) throws ExecException
ExecExceptionpublic void setInt(int fieldNum,
int val)
throws ExecException
setInt in interface TypeAwareTupleExecExceptionprotected abstract void generatedCodeSetInt(int fieldNum,
int val)
throws ExecException
ExecExceptionpublic void setLong(int fieldNum,
long val)
throws ExecException
setLong in interface TypeAwareTupleExecExceptionprotected abstract void generatedCodeSetLong(int fieldNum,
long val)
throws ExecException
ExecExceptionpublic void setFloat(int fieldNum,
float val)
throws ExecException
setFloat in interface TypeAwareTupleExecExceptionprotected abstract void generatedCodeSetFloat(int fieldNum,
float val)
throws ExecException
ExecExceptionpublic void setDouble(int fieldNum,
double val)
throws ExecException
setDouble in interface TypeAwareTupleExecExceptionprotected abstract void generatedCodeSetDouble(int fieldNum,
double val)
throws ExecException
ExecExceptionpublic void setBoolean(int fieldNum,
boolean val)
throws ExecException
setBoolean in interface TypeAwareTupleExecExceptionprotected abstract void generatedCodeSetBoolean(int fieldNum,
boolean val)
throws ExecException
ExecExceptionpublic void setDateTime(int fieldNum,
org.joda.time.DateTime val)
throws ExecException
setDateTime in interface TypeAwareTupleExecExceptionprotected abstract void generatedCodeSetDateTime(int fieldNum,
org.joda.time.DateTime val)
throws ExecException
ExecExceptionpublic void setBigDecimal(int fieldNum,
BigDecimal val)
throws ExecException
setBigDecimal in interface TypeAwareTupleExecExceptionprotected abstract void generatedCodeSetBigDecimal(int fieldNum,
BigDecimal val)
throws ExecException
ExecExceptionpublic void setBigInteger(int fieldNum,
BigInteger val)
throws ExecException
setBigInteger in interface TypeAwareTupleExecExceptionprotected abstract void generatedCodeSetBigInteger(int fieldNum,
BigInteger val)
throws ExecException
ExecExceptionpublic void setString(int fieldNum,
String val)
throws ExecException
setString in interface TypeAwareTupleExecExceptionprotected abstract void generatedCodeSetString(int fieldNum,
String val)
throws ExecException
ExecExceptionpublic void setTuple(int fieldNum,
Tuple val)
throws ExecException
setTuple in interface TypeAwareTupleExecExceptionprotected abstract void generatedCodeSetTuple(int fieldNum,
Tuple val)
throws ExecException
ExecExceptionpublic void setBytes(int fieldNum,
byte[] val)
throws ExecException
setBytes in interface TypeAwareTupleExecExceptionprotected abstract void generatedCodeSetBytes(int fieldNum,
byte[] val)
throws ExecException
ExecExceptionpublic void setDataBag(int fieldNum,
DataBag val)
throws ExecException
setDataBag in interface TypeAwareTupleExecExceptionprotected abstract void generatedCodeSetDataBag(int fieldNum,
DataBag val)
throws ExecException
ExecExceptionpublic void setMap(int fieldNum,
Map<String,Object> val)
throws ExecException
setMap in interface TypeAwareTupleExecExceptionprotected abstract void generatedCodeSetMap(int fieldNum,
Map<String,Object> val)
throws ExecException
ExecExceptionprotected int returnUnlessNull(boolean isNull,
int val)
throws FieldIsNullException
FieldIsNullExceptionprotected long returnUnlessNull(boolean isNull,
long val)
throws FieldIsNullException
FieldIsNullExceptionprotected float returnUnlessNull(boolean isNull,
float val)
throws FieldIsNullException
FieldIsNullExceptionprotected double returnUnlessNull(boolean isNull,
double val)
throws FieldIsNullException
FieldIsNullExceptionprotected boolean returnUnlessNull(boolean isNull,
boolean val)
throws FieldIsNullException
FieldIsNullExceptionprotected org.joda.time.DateTime returnUnlessNull(boolean isNull,
org.joda.time.DateTime val)
throws FieldIsNullException
FieldIsNullExceptionprotected BigDecimal returnUnlessNull(boolean isNull, BigDecimal val) throws FieldIsNullException
FieldIsNullExceptionprotected BigInteger returnUnlessNull(boolean isNull, BigInteger val) throws FieldIsNullException
FieldIsNullExceptionprotected Tuple returnUnlessNull(boolean isNull, Tuple val) throws FieldIsNullException
FieldIsNullExceptionprotected String returnUnlessNull(boolean isNull, String val) throws FieldIsNullException
FieldIsNullExceptionprotected byte[] returnUnlessNull(boolean isNull,
byte[] val)
throws FieldIsNullException
FieldIsNullExceptionprotected DataBag returnUnlessNull(boolean isNull, DataBag val) throws FieldIsNullException
FieldIsNullExceptionprotected Map<String,Object> returnUnlessNull(boolean isNull, Map<String,Object> val) throws FieldIsNullException
FieldIsNullExceptionpublic int getInt(int fieldNum)
throws ExecException
getInt in interface TypeAwareTupleExecExceptionprotected abstract int generatedCodeGetInt(int fieldNum)
throws ExecException
ExecExceptionpublic int unboxInt(Object val)
public long getLong(int fieldNum)
throws ExecException
getLong in interface TypeAwareTupleExecExceptionprotected abstract long generatedCodeGetLong(int fieldNum)
throws ExecException
ExecExceptionpublic long unboxLong(Object val)
public float getFloat(int fieldNum)
throws ExecException
getFloat in interface TypeAwareTupleExecExceptionprotected abstract float generatedCodeGetFloat(int fieldNum)
throws ExecException
ExecExceptionpublic float unboxFloat(Object val)
public double getDouble(int fieldNum)
throws ExecException
getDouble in interface TypeAwareTupleExecExceptionprotected abstract double generatedCodeGetDouble(int fieldNum)
throws ExecException
ExecExceptionpublic double unboxDouble(Object val)
public boolean getBoolean(int fieldNum)
throws ExecException
getBoolean in interface TypeAwareTupleExecExceptionprotected abstract boolean generatedCodeGetBoolean(int fieldNum)
throws ExecException
ExecExceptionpublic boolean unboxBoolean(Object val)
public org.joda.time.DateTime getDateTime(int fieldNum)
throws ExecException
getDateTime in interface TypeAwareTupleExecExceptionprotected abstract org.joda.time.DateTime generatedCodeGetDateTime(int fieldNum)
throws ExecException
ExecExceptionpublic org.joda.time.DateTime unboxDateTime(Object val)
public String getString(int fieldNum) throws ExecException
getString in interface TypeAwareTupleExecExceptionprotected abstract String generatedCodeGetString(int fieldNum) throws ExecException
ExecExceptionpublic byte[] getBytes(int fieldNum)
throws ExecException
getBytes in interface TypeAwareTupleExecExceptionpublic byte[] unboxBytes(Object val)
protected abstract byte[] generatedCodeGetBytes(int fieldNum)
throws ExecException
ExecExceptionpublic Tuple getTuple(int fieldNum) throws ExecException
getTuple in interface TypeAwareTupleExecExceptionprotected abstract Tuple generatedCodeGetTuple(int fieldNum) throws ExecException
ExecExceptionpublic DataBag getDataBag(int fieldNum) throws ExecException
getDataBag in interface TypeAwareTupleExecExceptionprotected abstract DataBag generatedCodeGetDataBag(int fieldNum) throws ExecException
ExecExceptionpublic Map<String,Object> getMap(int fieldNum) throws ExecException
getMap in interface TypeAwareTupleExecExceptionprotected abstract Map<String,Object> generatedCodeGetMap(int fieldNum) throws ExecException
ExecExceptionpublic BigDecimal getBigDecimal(int fieldNum) throws ExecException
getBigDecimal in interface TypeAwareTupleExecExceptionprotected abstract BigDecimal generatedCodeGetBigDecimal(int fieldNum) throws ExecException
ExecExceptionpublic BigDecimal unboxBigDecimal(Object val)
public BigInteger getBigInteger(int fieldNum) throws ExecException
getBigInteger in interface TypeAwareTupleExecExceptionprotected abstract BigInteger generatedCodeGetBigInteger(int fieldNum) throws ExecException
ExecExceptionpublic BigInteger unboxBigInteger(Object val)
public void setAndCatch(Tuple t)
public void setAndCatch(SchemaTuple<?> t)
protected void writeElements(DataOutput out) throws IOException
out - IOExceptionprotected abstract void generatedCodeWriteElements(DataOutput out) throws IOException
IOExceptionprotected int compareSize(Tuple t)
protected int compareNull(boolean usNull,
boolean themNull)
protected int compareNull(boolean usNull,
Tuple t,
int pos)
protected int compareElementAtPos(int val,
SchemaTuple<?> t,
int pos)
protected int compare(boolean usNull,
int usVal,
boolean themNull,
int themVal)
protected int compare(int val,
int themVal)
protected int compareWithElementAtPos(boolean isNull,
int val,
SchemaTuple<?> t,
int pos)
protected int compare(boolean usNull,
long usVal,
boolean themNull,
long themVal)
protected int compare(long val,
long themVal)
protected int compareWithElementAtPos(boolean isNull,
long val,
SchemaTuple<?> t,
int pos)
protected int compare(boolean usNull,
float usVal,
boolean themNull,
float themVal)
public int compare(float val,
float themVal)
protected int compareWithElementAtPos(boolean isNull,
float val,
SchemaTuple<?> t,
int pos)
protected int compare(boolean usNull,
double usVal,
boolean themNull,
double themVal)
protected int compare(double val,
double themVal)
protected int compareWithElementAtPos(boolean isNull,
double val,
SchemaTuple<?> t,
int pos)
protected int compare(boolean usNull,
boolean usVal,
boolean themNull,
boolean themVal)
protected int compare(boolean val,
boolean themVal)
protected int compareWithElementAtPos(boolean isNull,
boolean val,
SchemaTuple<?> t,
int pos)
protected int compare(boolean usNull,
byte[] usVal,
boolean themNull,
byte[] themVal)
protected int compare(byte[] val,
byte[] themVal)
protected int compareWithElementAtPos(boolean isNull,
byte[] val,
SchemaTuple<?> t,
int pos)
protected int compare(boolean usNull,
org.joda.time.DateTime usVal,
boolean themNull,
org.joda.time.DateTime themVal)
protected int compare(org.joda.time.DateTime val,
org.joda.time.DateTime themVal)
protected int compareWithElementAtPos(boolean isNull,
org.joda.time.DateTime val,
SchemaTuple<?> t,
int pos)
protected int compare(boolean usNull,
BigDecimal usVal,
boolean themNull,
BigDecimal themVal)
protected int compare(BigDecimal val, BigDecimal themVal)
protected int compareWithElementAtPos(boolean isNull,
BigDecimal val,
SchemaTuple<?> t,
int pos)
protected int compare(boolean usNull,
BigInteger usVal,
boolean themNull,
BigInteger themVal)
protected int compare(BigInteger val, BigInteger themVal)
protected int compareWithElementAtPos(boolean isNull,
BigInteger val,
SchemaTuple<?> t,
int pos)
protected int compareWithElementAtPos(boolean isNull,
String val,
SchemaTuple<?> t,
int pos)
protected int compareWithElementAtPos(boolean isNull,
DataBag val,
SchemaTuple<?> t,
int pos)
protected int compare(boolean usNull,
Map<String,Object> usVal,
boolean themNull,
Map<String,Object> themVal)
protected int compareWithElementAtPos(boolean isNull,
Map<String,Object> val,
SchemaTuple<?> t,
int pos)
protected int compareWithElementAtPos(boolean isNull,
SchemaTuple<?> val,
SchemaTuple<?> t,
int pos)
protected int compare(boolean usNull,
SchemaTuple<?> usVal,
boolean themNull,
Object themVal)
public abstract SchemaTuple.SchemaTupleQuickGenerator<T> getQuickGenerator()
public int size()
Tupleprotected abstract int generatedCodeSize()
public void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionprotected abstract void generatedCodeReadFields(DataInput in, boolean[] nulls) throws IOException
IOExceptionprotected abstract boolean[] generatedCodeNullsArray()
throws IOException
IOExceptionCopyright © 2007-2017 The Apache Software Foundation