|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ebay.erl.mobius.core.model.Tuple
com.ebay.erl.mobius.core.datajoin.DataJoinKey
public class DataJoinKey
This product is licensed under the Apache License, Version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0. This product contains portions derived from Apache hadoop which is licensed under the Apache License, Version 2.0, available at http://hadoop.apache.org. © 2007 – 2012 eBay Inc., Evan Chiu, Woody Zhou, Neel Sundaresan
Nested Class Summary | |
---|---|
static class |
DataJoinKey.Comparator
|
Nested classes/interfaces inherited from class com.ebay.erl.mobius.core.model.Tuple |
---|
Tuple.TupleColumnName |
Field Summary | |
---|---|
static java.lang.String |
DATASET_ID_FIELDNAME
|
static java.lang.String |
KEY_FIELDNAME
|
Fields inherited from class com.ebay.erl.mobius.core.model.Tuple |
---|
_INSERT_KEY, BOOLEAN_TYPE, BYTE_ARRAY_TYPE, BYTE_TYPE, conf, DATE_TYPE, DOUBLE_TYPE, estimate_size_in_bytes, FLOAT_TYPE, INTEGER_TYPE, isMutable, LONG_TYPE, lowerCases, namesToIdxMapping, NULL, NULL_TYPE, NULL_WRITABLE_TYPE, RESULT_WRAPPER_TYPE, SERIALIZABLE_TYPE, SHORT_TYPE, sortedKeys, STRING_MAP_TYPE, STRING_TYPE, TIME_TYPE, TIMESTAMP_TYPE, toStringOrdering, TUPLE_TYPE, values, WRITABLE_TYPE |
Constructor Summary | |
---|---|
DataJoinKey()
|
|
DataJoinKey(java.lang.String datasetID,
org.apache.hadoop.io.WritableComparable<?> key)
|
|
DataJoinKey(org.apache.hadoop.io.Text datasetID,
org.apache.hadoop.io.WritableComparable<?> key)
|
|
DataJoinKey(org.apache.hadoop.io.Text datasetID,
org.apache.hadoop.io.WritableComparable<?> key,
org.apache.hadoop.io.WritableComparable<?> sortKeyword,
java.lang.Class<?> sortComparator)
|
Method Summary | |
---|---|
int |
compare(byte[] b1,
int s1,
int l1,
byte[] b2,
int s2,
int l2)
compare two tuples in low level row format. |
int |
compare(Tuple t1,
Tuple t2)
Comparing two tuples. |
int |
compareTo(Tuple other)
Compare this tuple with other . |
java.lang.String |
getDatasetID()
|
org.apache.hadoop.io.WritableComparable |
getKey()
|
java.lang.Class |
getSortComparator()
|
org.apache.hadoop.io.WritableComparable |
getSortKeyword()
|
void |
readFields(java.io.DataInput in)
Deserialize the tuple from the input in . |
void |
set(java.lang.String datasetID,
org.apache.hadoop.io.WritableComparable<?> key,
org.apache.hadoop.io.WritableComparable<?> sortKeyword,
java.lang.Class<?> sortComparator)
|
Methods inherited from class com.ebay.erl.mobius.core.model.Tuple |
---|
check_in_schema, clone, equals, get, get, get, get, getBoolean, getBoolean, getByte, getByte, getConf, getDate, getDate, getDouble, getDouble, getDouble, getEstimatedSizeInMemory, getFloat, getFloat, getInt, getInt, getLong, getLong, getMap, getSchema, getShort, getShort, getSorted, getString, getString, getTime, getTime, getTimestamp, getTimestamp, getType, getTypeString, hashCode, hasSchema, immutable, insert, isDateType, isNumericalType, lowerCase, main, merge, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putNull, setConf, setSchema, setToStringOrdering, toString, valueOf, write |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String KEY_FIELDNAME
public static java.lang.String DATASET_ID_FIELDNAME
Constructor Detail |
---|
public DataJoinKey()
public DataJoinKey(java.lang.String datasetID, org.apache.hadoop.io.WritableComparable<?> key)
public DataJoinKey(org.apache.hadoop.io.Text datasetID, org.apache.hadoop.io.WritableComparable<?> key)
public DataJoinKey(org.apache.hadoop.io.Text datasetID, org.apache.hadoop.io.WritableComparable<?> key, org.apache.hadoop.io.WritableComparable<?> sortKeyword, java.lang.Class<?> sortComparator)
Method Detail |
---|
public void set(java.lang.String datasetID, org.apache.hadoop.io.WritableComparable<?> key, org.apache.hadoop.io.WritableComparable<?> sortKeyword, java.lang.Class<?> sortComparator)
public void readFields(java.io.DataInput in) throws java.io.IOException
Tuple
in
.
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class Tuple
java.io.IOException
public org.apache.hadoop.io.WritableComparable getKey()
public java.lang.String getDatasetID()
public org.apache.hadoop.io.WritableComparable getSortKeyword()
public java.lang.Class getSortComparator()
public int compareTo(Tuple other)
Tuple
other
.
It calls Tuple.compare(Tuple, Tuple)
underline.
compareTo
in interface java.lang.Comparable<Tuple>
compareTo
in class Tuple
public int compare(Tuple t1, Tuple t2)
Tuple
It compares the values of the two tuples one by one in sequence, and as long as there is a difference between two values, then the difference is returned.
If the number of values in the tuples are different, the values are compared up to the boundary of the smaller size tuple. If all the values before the boundary have no differences, then the smaller size tuple is considered to be placed before the bigger size tuple.
compare
in interface java.util.Comparator<Tuple>
compare
in class Tuple
public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
Tuple
compare
in interface org.apache.hadoop.io.RawComparator<Tuple>
compare
in class Tuple
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |