@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(java.lang.Object val)
Append a field to a tuple.
|
protected java.math.BigDecimal |
box(java.math.BigDecimal v) |
protected java.math.BigInteger |
box(java.math.BigInteger v) |
protected java.lang.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 java.lang.Double |
box(double v) |
protected java.lang.Float |
box(float v) |
protected java.lang.Integer |
box(int v) |
protected java.lang.Long |
box(long v) |
protected java.util.Map<java.lang.String,java.lang.Object> |
box(java.util.Map<java.lang.String,java.lang.Object> v) |
protected java.lang.String |
box(java.lang.String v) |
protected Tuple |
box(Tuple t) |
protected int |
compare(java.math.BigDecimal val,
java.math.BigDecimal themVal) |
protected int |
compare(java.math.BigInteger val,
java.math.BigInteger themVal) |
protected int |
compare(boolean usNull,
java.math.BigDecimal usVal,
boolean themNull,
java.math.BigDecimal themVal) |
protected int |
compare(boolean usNull,
java.math.BigInteger usVal,
boolean themNull,
java.math.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,
java.util.Map<java.lang.String,java.lang.Object> usVal,
boolean themNull,
java.util.Map<java.lang.String,java.lang.Object> themVal) |
protected int |
compare(boolean usNull,
SchemaTuple<?> usVal,
boolean themNull,
java.lang.Object themVal) |
protected int |
compare(boolean usNull,
java.lang.String usVal,
boolean themNull,
java.lang.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(java.util.Map<java.lang.String,java.lang.Object> val,
java.util.Map<java.lang.String,java.lang.Object> themVal) |
protected int |
compare(java.lang.String val,
java.lang.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(java.lang.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,
java.math.BigDecimal val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
java.math.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,
java.util.Map<java.lang.String,java.lang.Object> val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
SchemaTuple<?> val,
SchemaTuple<?> t,
int pos) |
protected int |
compareWithElementAtPos(boolean isNull,
java.lang.String val,
SchemaTuple<?> t,
int pos) |
boolean |
equals(java.lang.Object other) |
protected abstract int |
generatedCodeCompareTo(SchemaTuple<?> t,
boolean checkType) |
protected abstract int |
generatedCodeCompareToSpecific(T t) |
protected abstract java.math.BigDecimal |
generatedCodeGetBigDecimal(int fieldNum) |
protected abstract java.math.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 java.lang.Object |
generatedCodeGetField(int fieldNum) |
protected abstract float |
generatedCodeGetFloat(int fieldNum) |
protected abstract int |
generatedCodeGetInt(int fieldNum) |
protected abstract long |
generatedCodeGetLong(int fieldNum) |
protected abstract java.util.Map<java.lang.String,java.lang.Object> |
generatedCodeGetMap(int fieldNum) |
protected abstract java.lang.String |
generatedCodeGetString(int fieldNum) |
protected abstract Tuple |
generatedCodeGetTuple(int fieldNum) |
protected abstract int |
generatedCodeHashCode() |
protected abstract boolean[] |
generatedCodeNullsArray() |
protected abstract void |
generatedCodeReadFields(java.io.DataInput in,
boolean[] nulls) |
protected abstract SchemaTuple<T> |
generatedCodeSet(SchemaTuple<?> t,
boolean checkType) |
protected abstract void |
generatedCodeSetBigDecimal(int fieldNum,
java.math.BigDecimal val) |
protected abstract void |
generatedCodeSetBigInteger(int fieldNum,
java.math.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,
java.lang.Object val) |
protected abstract void |
generatedCodeSetFloat(int fieldNum,
float val) |
protected abstract void |
generatedCodeSetInt(int fieldNum,
int val) |
protected abstract void |
generatedCodeSetIterator(java.util.Iterator<java.lang.Object> l) |
protected abstract void |
generatedCodeSetLong(int fieldNum,
long val) |
protected abstract void |
generatedCodeSetMap(int fieldNum,
java.util.Map<java.lang.String,java.lang.Object> val) |
protected abstract SchemaTuple<T> |
generatedCodeSetSpecific(T t) |
protected abstract void |
generatedCodeSetString(int fieldNum,
java.lang.String val) |
protected abstract void |
generatedCodeSetTuple(int fieldNum,
Tuple val) |
protected abstract int |
generatedCodeSize() |
protected abstract void |
generatedCodeWriteElements(java.io.DataOutput out) |
java.lang.Object |
get(int fieldNum)
Get the value in a given field.
|
java.util.List<java.lang.Object> |
getAll()
Get all of the fields in the tuple as a list.
|
java.math.BigDecimal |
getBigDecimal(int fieldNum) |
java.math.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) |
java.util.Map<java.lang.String,java.lang.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.
|
java.lang.String |
getSchemaString() |
abstract int |
getSchemaTupleIdentifier()
This method will return the identifier that the generated code
was generated with.
|
java.lang.String |
getString(int fieldNum) |
Tuple |
getTuple(int fieldNum) |
byte |
getType(int fieldNum)
Find the type of a given field.
|
protected java.lang.Object |
getTypeAwareBase(int fieldNum,
java.lang.String type) |
int |
hashCode() |
protected int |
hashCodePiece(int hash,
java.math.BigDecimal v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
java.math.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,
java.util.Map<java.lang.String,java.lang.Object> v,
boolean isNull) |
protected int |
hashCodePiece(int hash,
java.lang.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(java.lang.Object o) |
protected static java.math.BigDecimal |
read(java.io.DataInput in,
java.math.BigDecimal v) |
protected static java.math.BigInteger |
read(java.io.DataInput in,
java.math.BigInteger v) |
protected static byte[] |
read(java.io.DataInput in,
byte[] v) |
protected static DataBag |
read(java.io.DataInput in,
DataBag v) |
protected static org.joda.time.DateTime |
read(java.io.DataInput in,
org.joda.time.DateTime v) |
protected static double |
read(java.io.DataInput in,
double v) |
protected static float |
read(java.io.DataInput in,
float v) |
protected static int |
read(java.io.DataInput in,
int v) |
protected static long |
read(java.io.DataInput in,
long v) |
protected static java.util.Map<java.lang.String,java.lang.Object> |
read(java.io.DataInput in,
java.util.Map<java.lang.String,java.lang.Object> v) |
protected static java.lang.String |
read(java.io.DataInput in,
java.lang.String v) |
void |
readFields(java.io.DataInput in) |
void |
reference(Tuple t)
Make this tuple reference the contents of another.
|
protected java.math.BigDecimal |
returnUnlessNull(boolean isNull,
java.math.BigDecimal val) |
protected java.math.BigInteger |
returnUnlessNull(boolean isNull,
java.math.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 java.util.Map<java.lang.String,java.lang.Object> |
returnUnlessNull(boolean isNull,
java.util.Map<java.lang.String,java.lang.Object> val) |
protected java.lang.String |
returnUnlessNull(boolean isNull,
java.lang.String val) |
protected Tuple |
returnUnlessNull(boolean isNull,
Tuple val) |
protected abstract int |
schemaSize() |
void |
set(int fieldNum,
java.lang.Object val)
Set the value in a given field.
|
SchemaTuple<T> |
set(java.util.List<java.lang.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,
java.math.BigDecimal val) |
void |
setBigInteger(int fieldNum,
java.math.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,
java.util.Map<java.lang.String,java.lang.Object> val) |
protected SchemaTuple<T> |
setSpecific(T t) |
void |
setString(int fieldNum,
java.lang.String val) |
void |
setTuple(int fieldNum,
Tuple val) |
protected void |
setTypeAwareBase(int fieldNum,
java.lang.Object val,
java.lang.String type) |
int |
size()
Find the size of the tuple.
|
protected static Schema |
staticSchemaGen(java.lang.String s) |
protected boolean |
unbox(java.lang.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(java.lang.Double v) |
protected float |
unbox(java.lang.Float v) |
protected int |
unbox(java.lang.Integer v) |
protected long |
unbox(java.lang.Long v) |
protected java.util.Map<java.lang.String,java.lang.Object> |
unbox(java.util.Map<java.lang.String,java.lang.Object> v) |
protected java.math.BigDecimal |
unbox(java.lang.Object v,
java.math.BigDecimal t) |
protected java.math.BigInteger |
unbox(java.lang.Object v,
java.math.BigInteger t) |
protected boolean |
unbox(java.lang.Object v,
boolean t) |
protected byte[] |
unbox(java.lang.Object v,
byte[] t) |
protected DataBag |
unbox(java.lang.Object v,
DataBag t) |
protected org.joda.time.DateTime |
unbox(java.lang.Object v,
org.joda.time.DateTime t) |
protected double |
unbox(java.lang.Object v,
double t) |
protected float |
unbox(java.lang.Object v,
float t) |
protected int |
unbox(java.lang.Object v,
int t) |
protected long |
unbox(java.lang.Object v,
long t) |
protected java.util.Map<java.lang.String,java.lang.Object> |
unbox(java.lang.Object v,
java.util.Map<java.lang.String,java.lang.Object> t) |
protected java.lang.String |
unbox(java.lang.Object v,
java.lang.String t) |
protected Tuple |
unbox(java.lang.Object v,
Tuple t) |
java.math.BigDecimal |
unboxBigDecimal(java.lang.Object val) |
java.math.BigInteger |
unboxBigInteger(java.lang.Object val) |
boolean |
unboxBoolean(java.lang.Object val) |
byte[] |
unboxBytes(java.lang.Object val) |
protected DataBag |
unboxDataBag(java.lang.Object val) |
org.joda.time.DateTime |
unboxDateTime(java.lang.Object val) |
double |
unboxDouble(java.lang.Object val) |
float |
unboxFloat(java.lang.Object val) |
int |
unboxInt(java.lang.Object val) |
long |
unboxLong(java.lang.Object val) |
protected java.util.Map<java.lang.String,java.lang.Object> |
unboxMap(java.lang.Object val) |
java.lang.String |
unboxString(java.lang.Object val) |
protected Tuple |
unboxTuple(java.lang.Object val) |
void |
write(java.io.DataOutput out) |
protected static void |
write(java.io.DataOutput out,
java.math.BigDecimal v) |
protected static void |
write(java.io.DataOutput out,
java.math.BigInteger v) |
protected void |
write(java.io.DataOutput out,
boolean writeIdentifiers) |
protected static void |
write(java.io.DataOutput out,
byte[] v) |
protected static void |
write(java.io.DataOutput out,
DataBag v) |
protected static void |
write(java.io.DataOutput out,
org.joda.time.DateTime v) |
protected static void |
write(java.io.DataOutput out,
double v) |
protected static void |
write(java.io.DataOutput out,
float v) |
protected static void |
write(java.io.DataOutput out,
int v) |
protected static void |
write(java.io.DataOutput out,
long v) |
protected static void |
write(java.io.DataOutput out,
java.util.Map<java.lang.String,java.lang.Object> v) |
protected static void |
write(java.io.DataOutput out,
SchemaTuple<?> t) |
protected static void |
write(java.io.DataOutput out,
java.lang.String v) |
protected void |
writeElements(java.io.DataOutput out)
This method is responsible for writing everything contained by the Tuple.
|
iterator, toDelimitedString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getSchema
toDelimitedString
public void append(java.lang.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.public long getMemorySize()
getMemorySize
in interface Tuple
protected abstract long getGeneratedCodeMemorySize()
public abstract int getSchemaTupleIdentifier()
protected abstract int schemaSize()
public java.lang.String getSchemaString()
protected SchemaTuple<T> set(SchemaTuple<?> t, boolean checkType) throws ExecException
ExecException
protected abstract SchemaTuple<T> generatedCodeSet(SchemaTuple<?> t, boolean checkType) throws ExecException
ExecException
protected SchemaTuple<T> setSpecific(T t)
protected abstract SchemaTuple<T> generatedCodeSetSpecific(T t)
public SchemaTuple<T> set(Tuple t) throws ExecException
ExecException
protected SchemaTuple<T> set(Tuple t, boolean checkType) throws ExecException
ExecException
public SchemaTuple<T> set(SchemaTuple<?> t) throws ExecException
ExecException
public SchemaTuple<T> set(java.util.List<java.lang.Object> l) throws ExecException
ExecException
protected abstract void generatedCodeSetIterator(java.util.Iterator<java.lang.Object> l) throws ExecException
ExecException
protected void write(java.io.DataOutput out, boolean writeIdentifiers) throws java.io.IOException
java.io.IOException
protected static void write(java.io.DataOutput out, DataBag v) throws java.io.IOException
java.io.IOException
protected static void write(java.io.DataOutput out, java.util.Map<java.lang.String,java.lang.Object> v) throws java.io.IOException
java.io.IOException
protected static void write(java.io.DataOutput out, int v) throws java.io.IOException
java.io.IOException
protected static void write(java.io.DataOutput out, long v) throws java.io.IOException
java.io.IOException
protected static void write(java.io.DataOutput out, float v) throws java.io.IOException
java.io.IOException
protected static void write(java.io.DataOutput out, double v) throws java.io.IOException
java.io.IOException
protected static void write(java.io.DataOutput out, org.joda.time.DateTime v) throws java.io.IOException
java.io.IOException
protected static void write(java.io.DataOutput out, java.math.BigDecimal v) throws java.io.IOException
java.io.IOException
protected static void write(java.io.DataOutput out, java.math.BigInteger v) throws java.io.IOException
java.io.IOException
protected static void write(java.io.DataOutput out, byte[] v) throws java.io.IOException
java.io.IOException
protected static void write(java.io.DataOutput out, java.lang.String v) throws java.io.IOException
java.io.IOException
protected static void write(java.io.DataOutput out, SchemaTuple<?> t) throws java.io.IOException
java.io.IOException
protected static DataBag read(java.io.DataInput in, DataBag v) throws java.io.IOException
java.io.IOException
protected static java.util.Map<java.lang.String,java.lang.Object> read(java.io.DataInput in, java.util.Map<java.lang.String,java.lang.Object> v) throws java.io.IOException
java.io.IOException
protected static int read(java.io.DataInput in, int v) throws java.io.IOException
java.io.IOException
protected static long read(java.io.DataInput in, long v) throws java.io.IOException
java.io.IOException
protected static float read(java.io.DataInput in, float v) throws java.io.IOException
java.io.IOException
protected static double read(java.io.DataInput in, double v) throws java.io.IOException
java.io.IOException
protected static org.joda.time.DateTime read(java.io.DataInput in, org.joda.time.DateTime v) throws java.io.IOException
java.io.IOException
protected static java.math.BigDecimal read(java.io.DataInput in, java.math.BigDecimal v) throws java.io.IOException
java.io.IOException
protected static java.math.BigInteger read(java.io.DataInput in, java.math.BigInteger v) throws java.io.IOException
java.io.IOException
protected static java.lang.String read(java.io.DataInput in, java.lang.String v) throws java.io.IOException
java.io.IOException
protected static byte[] read(java.io.DataInput in, byte[] v) throws java.io.IOException
java.io.IOException
public void write(java.io.DataOutput out) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void reference(Tuple t)
Tuple
reference
in interface Tuple
reference
in class AbstractTuple
t
- Tuple to reference.public java.util.List<java.lang.Object> getAll()
Tuple
public abstract boolean isSpecificSchemaTuple(java.lang.Object o)
public int compareTo(java.lang.Object other)
compareTo
in interface java.lang.Comparable
public 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(java.lang.Object other)
equals
in class AbstractTuple
protected java.util.Map<java.lang.String,java.lang.Object> unbox(java.lang.Object v, java.util.Map<java.lang.String,java.lang.Object> t)
protected byte[] unbox(java.lang.Object v, byte[] t)
protected int unbox(java.lang.Object v, int t)
protected long unbox(java.lang.Object v, long t)
protected float unbox(java.lang.Object v, float t)
protected double unbox(java.lang.Object v, double t)
protected boolean unbox(java.lang.Object v, boolean t)
protected org.joda.time.DateTime unbox(java.lang.Object v, org.joda.time.DateTime t)
protected java.math.BigDecimal unbox(java.lang.Object v, java.math.BigDecimal t)
protected java.math.BigInteger unbox(java.lang.Object v, java.math.BigInteger t)
protected java.lang.String unbox(java.lang.Object v, java.lang.String t)
protected java.util.Map<java.lang.String,java.lang.Object> unbox(java.util.Map<java.lang.String,java.lang.Object> v)
protected byte[] unbox(DataByteArray v)
protected int unbox(java.lang.Integer v)
protected long unbox(java.lang.Long v)
protected float unbox(java.lang.Float v)
protected double unbox(java.lang.Double v)
protected boolean unbox(java.lang.Boolean v)
protected org.joda.time.DateTime unbox(org.joda.time.DateTime v)
protected java.util.Map<java.lang.String,java.lang.Object> box(java.util.Map<java.lang.String,java.lang.Object> v)
protected DataByteArray box(byte[] v)
protected java.lang.String box(java.lang.String v)
protected java.lang.Integer box(int v)
protected java.lang.Long box(long v)
protected java.lang.Float box(float v)
protected java.lang.Double box(double v)
protected java.lang.Boolean box(boolean v)
protected org.joda.time.DateTime box(org.joda.time.DateTime v)
protected java.math.BigDecimal box(java.math.BigDecimal v)
protected java.math.BigInteger box(java.math.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, java.math.BigDecimal v, boolean isNull)
protected int hashCodePiece(int hash, java.math.BigInteger v, boolean isNull)
protected int hashCodePiece(int hash, byte[] v, boolean isNull)
protected int hashCodePiece(int hash, java.lang.String v, boolean isNull)
protected int hashCodePiece(int hash, Tuple v, boolean isNull)
protected int hashCodePiece(int hash, DataBag v, boolean isNull)
protected int hashCodePiece(int hash, java.util.Map<java.lang.String,java.lang.Object> v, boolean isNull)
public int hashCode()
hashCode
in class java.lang.Object
protected abstract int generatedCodeHashCode()
public void set(int fieldNum, java.lang.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
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 abstract void generatedCodeSetField(int fieldNum, java.lang.Object val) throws ExecException
ExecException
public java.lang.Object get(int fieldNum) throws ExecException
Tuple
get
in interface 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 abstract java.lang.Object generatedCodeGetField(int fieldNum) throws ExecException
ExecException
public boolean isNull(int fieldNum) throws ExecException
AbstractTuple
isNull
in interface Tuple
isNull
in class AbstractTuple
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 abstract boolean isGeneratedCodeFieldNull(int fieldNum) throws ExecException
ExecException
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 abstract byte getGeneratedCodeFieldType(int fieldNum) throws ExecException
ExecException
protected void setTypeAwareBase(int fieldNum, java.lang.Object val, java.lang.String type) throws ExecException
ExecException
protected java.lang.Object getTypeAwareBase(int fieldNum, java.lang.String type) throws ExecException
ExecException
public void setInt(int fieldNum, int val) throws ExecException
setInt
in interface TypeAwareTuple
ExecException
protected abstract void generatedCodeSetInt(int fieldNum, int val) throws ExecException
ExecException
public void setLong(int fieldNum, long val) throws ExecException
setLong
in interface TypeAwareTuple
ExecException
protected abstract void generatedCodeSetLong(int fieldNum, long val) throws ExecException
ExecException
public void setFloat(int fieldNum, float val) throws ExecException
setFloat
in interface TypeAwareTuple
ExecException
protected abstract void generatedCodeSetFloat(int fieldNum, float val) throws ExecException
ExecException
public void setDouble(int fieldNum, double val) throws ExecException
setDouble
in interface TypeAwareTuple
ExecException
protected abstract void generatedCodeSetDouble(int fieldNum, double val) throws ExecException
ExecException
public void setBoolean(int fieldNum, boolean val) throws ExecException
setBoolean
in interface TypeAwareTuple
ExecException
protected abstract void generatedCodeSetBoolean(int fieldNum, boolean val) throws ExecException
ExecException
public void setDateTime(int fieldNum, org.joda.time.DateTime val) throws ExecException
setDateTime
in interface TypeAwareTuple
ExecException
protected abstract void generatedCodeSetDateTime(int fieldNum, org.joda.time.DateTime val) throws ExecException
ExecException
public void setBigDecimal(int fieldNum, java.math.BigDecimal val) throws ExecException
setBigDecimal
in interface TypeAwareTuple
ExecException
protected abstract void generatedCodeSetBigDecimal(int fieldNum, java.math.BigDecimal val) throws ExecException
ExecException
public void setBigInteger(int fieldNum, java.math.BigInteger val) throws ExecException
setBigInteger
in interface TypeAwareTuple
ExecException
protected abstract void generatedCodeSetBigInteger(int fieldNum, java.math.BigInteger val) throws ExecException
ExecException
public void setString(int fieldNum, java.lang.String val) throws ExecException
setString
in interface TypeAwareTuple
ExecException
protected abstract void generatedCodeSetString(int fieldNum, java.lang.String val) throws ExecException
ExecException
public void setTuple(int fieldNum, Tuple val) throws ExecException
setTuple
in interface TypeAwareTuple
ExecException
protected abstract void generatedCodeSetTuple(int fieldNum, Tuple val) throws ExecException
ExecException
public void setBytes(int fieldNum, byte[] val) throws ExecException
setBytes
in interface TypeAwareTuple
ExecException
protected abstract void generatedCodeSetBytes(int fieldNum, byte[] val) throws ExecException
ExecException
public void setDataBag(int fieldNum, DataBag val) throws ExecException
setDataBag
in interface TypeAwareTuple
ExecException
protected abstract void generatedCodeSetDataBag(int fieldNum, DataBag val) throws ExecException
ExecException
public void setMap(int fieldNum, java.util.Map<java.lang.String,java.lang.Object> val) throws ExecException
setMap
in interface TypeAwareTuple
ExecException
protected abstract void generatedCodeSetMap(int fieldNum, java.util.Map<java.lang.String,java.lang.Object> val) throws ExecException
ExecException
protected int returnUnlessNull(boolean isNull, int val) throws FieldIsNullException
FieldIsNullException
protected long returnUnlessNull(boolean isNull, long val) throws FieldIsNullException
FieldIsNullException
protected float returnUnlessNull(boolean isNull, float val) throws FieldIsNullException
FieldIsNullException
protected double returnUnlessNull(boolean isNull, double val) throws FieldIsNullException
FieldIsNullException
protected boolean returnUnlessNull(boolean isNull, boolean val) throws FieldIsNullException
FieldIsNullException
protected org.joda.time.DateTime returnUnlessNull(boolean isNull, org.joda.time.DateTime val) throws FieldIsNullException
FieldIsNullException
protected java.math.BigDecimal returnUnlessNull(boolean isNull, java.math.BigDecimal val) throws FieldIsNullException
FieldIsNullException
protected java.math.BigInteger returnUnlessNull(boolean isNull, java.math.BigInteger val) throws FieldIsNullException
FieldIsNullException
protected Tuple returnUnlessNull(boolean isNull, Tuple val) throws FieldIsNullException
FieldIsNullException
protected java.lang.String returnUnlessNull(boolean isNull, java.lang.String val) throws FieldIsNullException
FieldIsNullException
protected byte[] returnUnlessNull(boolean isNull, byte[] val) throws FieldIsNullException
FieldIsNullException
protected DataBag returnUnlessNull(boolean isNull, DataBag val) throws FieldIsNullException
FieldIsNullException
protected java.util.Map<java.lang.String,java.lang.Object> returnUnlessNull(boolean isNull, java.util.Map<java.lang.String,java.lang.Object> val) throws FieldIsNullException
FieldIsNullException
public int getInt(int fieldNum) throws ExecException
getInt
in interface TypeAwareTuple
ExecException
protected abstract int generatedCodeGetInt(int fieldNum) throws ExecException
ExecException
public int unboxInt(java.lang.Object val)
public long getLong(int fieldNum) throws ExecException
getLong
in interface TypeAwareTuple
ExecException
protected abstract long generatedCodeGetLong(int fieldNum) throws ExecException
ExecException
public long unboxLong(java.lang.Object val)
public float getFloat(int fieldNum) throws ExecException
getFloat
in interface TypeAwareTuple
ExecException
protected abstract float generatedCodeGetFloat(int fieldNum) throws ExecException
ExecException
public float unboxFloat(java.lang.Object val)
public double getDouble(int fieldNum) throws ExecException
getDouble
in interface TypeAwareTuple
ExecException
protected abstract double generatedCodeGetDouble(int fieldNum) throws ExecException
ExecException
public double unboxDouble(java.lang.Object val)
public boolean getBoolean(int fieldNum) throws ExecException
getBoolean
in interface TypeAwareTuple
ExecException
protected abstract boolean generatedCodeGetBoolean(int fieldNum) throws ExecException
ExecException
public boolean unboxBoolean(java.lang.Object val)
public org.joda.time.DateTime getDateTime(int fieldNum) throws ExecException
getDateTime
in interface TypeAwareTuple
ExecException
protected abstract org.joda.time.DateTime generatedCodeGetDateTime(int fieldNum) throws ExecException
ExecException
public org.joda.time.DateTime unboxDateTime(java.lang.Object val)
public java.lang.String getString(int fieldNum) throws ExecException
getString
in interface TypeAwareTuple
ExecException
protected abstract java.lang.String generatedCodeGetString(int fieldNum) throws ExecException
ExecException
public java.lang.String unboxString(java.lang.Object val)
public byte[] getBytes(int fieldNum) throws ExecException
getBytes
in interface TypeAwareTuple
ExecException
public byte[] unboxBytes(java.lang.Object val)
protected abstract byte[] generatedCodeGetBytes(int fieldNum) throws ExecException
ExecException
public Tuple getTuple(int fieldNum) throws ExecException
getTuple
in interface TypeAwareTuple
ExecException
protected abstract Tuple generatedCodeGetTuple(int fieldNum) throws ExecException
ExecException
protected Tuple unboxTuple(java.lang.Object val)
public DataBag getDataBag(int fieldNum) throws ExecException
getDataBag
in interface TypeAwareTuple
ExecException
protected abstract DataBag generatedCodeGetDataBag(int fieldNum) throws ExecException
ExecException
protected DataBag unboxDataBag(java.lang.Object val)
public java.util.Map<java.lang.String,java.lang.Object> getMap(int fieldNum) throws ExecException
getMap
in interface TypeAwareTuple
ExecException
protected abstract java.util.Map<java.lang.String,java.lang.Object> generatedCodeGetMap(int fieldNum) throws ExecException
ExecException
protected java.util.Map<java.lang.String,java.lang.Object> unboxMap(java.lang.Object val)
public java.math.BigDecimal getBigDecimal(int fieldNum) throws ExecException
getBigDecimal
in interface TypeAwareTuple
ExecException
protected abstract java.math.BigDecimal generatedCodeGetBigDecimal(int fieldNum) throws ExecException
ExecException
public java.math.BigDecimal unboxBigDecimal(java.lang.Object val)
public java.math.BigInteger getBigInteger(int fieldNum) throws ExecException
getBigInteger
in interface TypeAwareTuple
ExecException
protected abstract java.math.BigInteger generatedCodeGetBigInteger(int fieldNum) throws ExecException
ExecException
public java.math.BigInteger unboxBigInteger(java.lang.Object val)
protected static Schema staticSchemaGen(java.lang.String s)
public void setAndCatch(Tuple t)
public void setAndCatch(SchemaTuple<?> t)
protected void writeElements(java.io.DataOutput out) throws java.io.IOException
out
- java.io.IOException
protected abstract void generatedCodeWriteElements(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
protected 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, java.math.BigDecimal usVal, boolean themNull, java.math.BigDecimal themVal)
protected int compare(java.math.BigDecimal val, java.math.BigDecimal themVal)
protected int compareWithElementAtPos(boolean isNull, java.math.BigDecimal val, SchemaTuple<?> t, int pos)
protected int compare(boolean usNull, java.math.BigInteger usVal, boolean themNull, java.math.BigInteger themVal)
protected int compare(java.math.BigInteger val, java.math.BigInteger themVal)
protected int compareWithElementAtPos(boolean isNull, java.math.BigInteger val, SchemaTuple<?> t, int pos)
protected int compare(boolean usNull, java.lang.String usVal, boolean themNull, java.lang.String themVal)
protected int compare(java.lang.String val, java.lang.String themVal)
protected int compareWithElementAtPos(boolean isNull, java.lang.String val, SchemaTuple<?> t, int pos)
protected int compareWithElementAtPos(boolean isNull, DataBag val, SchemaTuple<?> t, int pos)
protected int compare(boolean usNull, java.util.Map<java.lang.String,java.lang.Object> usVal, boolean themNull, java.util.Map<java.lang.String,java.lang.Object> themVal)
protected int compare(java.util.Map<java.lang.String,java.lang.Object> val, java.util.Map<java.lang.String,java.lang.Object> themVal)
protected int compareWithElementAtPos(boolean isNull, java.util.Map<java.lang.String,java.lang.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, java.lang.Object themVal)
public abstract SchemaTuple.SchemaTupleQuickGenerator<T> getQuickGenerator()
public int size()
Tuple
protected abstract int generatedCodeSize()
public void readFields(java.io.DataInput in) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
protected abstract void generatedCodeReadFields(java.io.DataInput in, boolean[] nulls) throws java.io.IOException
java.io.IOException
protected abstract boolean[] generatedCodeNullsArray() throws java.io.IOException
java.io.IOException
Copyright © 2007-2017 The Apache Software Foundation