|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.HStoreKey
KeyValue.
public class HStoreKey
A Key for a stored row.
| Nested Class Summary | |
|---|---|
static class |
HStoreKey.HStoreKeyComparator
Deprecated. Passed as comparator for memcache and for store files. |
static class |
HStoreKey.HStoreKeyMetaComparator
Deprecated. Passed as comparator for memcache and for store files. |
static class |
HStoreKey.HStoreKeyRootComparator
Deprecated. Passed as comparator for memcache and for store files. |
static class |
HStoreKey.MetaStoreKeyComparator
Deprecated. StoreKeyComparator for the .META. |
static class |
HStoreKey.RootStoreKeyComparator
Deprecated. StoreKeyComparator for the -ROOT- table. |
static class |
HStoreKey.StoreKeyComparator
Deprecated. RawComparator for plain -- i.e. |
| Field Summary | |
|---|---|
static char |
COLUMN_FAMILY_DELIMITER
Deprecated. Colon character in UTF-8 |
static int |
ESTIMATED_HEAP_TAX
Deprecated. Estimated size tax paid for each instance of HSK. |
| Constructor Summary | |
|---|---|
HStoreKey()
Deprecated. Default constructor used in conjunction with Writable interface |
|
HStoreKey(byte[] row)
Deprecated. Create an HStoreKey specifying only the row The column defaults to the empty string, the time stamp defaults to Long.MAX_VALUE and the table defaults to empty string |
|
HStoreKey(byte[] row,
byte[] column)
Deprecated. Create an HStoreKey specifying the row and column names The timestamp defaults to LATEST_TIMESTAMP and table name defaults to the empty string |
|
HStoreKey(byte[] row,
byte[] column,
long timestamp)
Deprecated. Create an HStoreKey specifying all the fields with specified table Does not make copies of the passed byte arrays. |
|
HStoreKey(byte[] row,
long timestamp)
Deprecated. Create an HStoreKey specifying the row and timestamp The column and table names default to the empty string |
|
HStoreKey(ByteBuffer bb)
Deprecated. |
|
HStoreKey(HStoreKey other)
Deprecated. Constructs a new HStoreKey from another |
|
HStoreKey(String row)
Deprecated. Create an HStoreKey specifying only the row The column defaults to the empty string, the time stamp defaults to Long.MAX_VALUE and the table defaults to empty string |
|
HStoreKey(String row,
String column)
Deprecated. Create an HStoreKey specifying the row and column names The timestamp defaults to LATEST_TIMESTAMP and table name defaults to the empty string |
|
HStoreKey(String row,
String column,
long timestamp)
Deprecated. Create an HStoreKey specifying all the fields Does not make copies of the passed byte arrays. |
|
| Method Summary | |
|---|---|
static byte[] |
addDelimiter(byte[] family)
Deprecated. |
protected static int |
compareMetaRows(byte[] left,
int loffset,
int llength,
byte[] right,
int roffset,
int rlength)
Deprecated. |
protected static int |
compareRootRows(byte[] left,
int loffset,
int llength,
byte[] right,
int roffset,
int rlength)
Deprecated. |
int |
compareTo(HStoreKey o)
Deprecated. Use Comparators instead. This can give wrong results. |
static HStoreKey |
create(byte[] b)
Deprecated. Create a store key. |
static HStoreKey |
create(byte[] b,
int offset,
int length)
Deprecated. Create a store key. |
static HStoreKey |
create(ByteBuffer bb)
Deprecated. Create a store key. |
boolean |
equals(Object obj)
Deprecated. |
static boolean |
equalsTwoRowKeys(byte[] rowA,
byte[] rowB)
Deprecated. Utility method to check if two row keys are equal. |
byte[] |
getBytes()
Deprecated. |
static byte[] |
getBytes(byte[] row)
Deprecated. |
static byte[] |
getBytes(byte[] row,
byte[] column,
long ts)
Deprecated. |
static byte[] |
getBytes(HStoreKey hsk)
Deprecated. Return serialize hsk bytes. |
byte[] |
getColumn()
Deprecated. |
static byte[] |
getColumn(ByteBuffer bb)
Deprecated. |
static HStoreKey.StoreKeyComparator |
getComparator(byte[] tablename)
Deprecated. |
static byte[] |
getFamily(byte[] column)
Deprecated. |
static int |
getFamilyDelimiterIndex(byte[] b)
Deprecated. |
static Integer |
getFamilyMapKey(byte[] column)
Deprecated. |
static byte[] |
getQualifier(byte[] column)
Deprecated. |
static HStoreKey.StoreKeyComparator |
getRawComparator(HRegionInfo hri)
Deprecated. |
byte[] |
getRow()
Deprecated. |
static byte[] |
getRow(ByteBuffer bb)
Deprecated. |
static int |
getSerializedSize(HStoreKey hsk)
Deprecated. |
long |
getTimestamp()
Deprecated. |
static long |
getTimestamp(ByteBuffer bb)
Deprecated. |
static org.apache.hadoop.io.WritableComparator |
getWritableComparator(HRegionInfo hri)
Deprecated. |
int |
hashCode()
Deprecated. |
long |
heapSize()
Deprecated. |
boolean |
matchesRowCol(HStoreKey other)
Deprecated. Compares the row and column of two keys |
boolean |
matchesRowFamily(HStoreKey that)
Deprecated. Compares the row and column family of two keys |
boolean |
matchesWithoutColumn(HStoreKey other)
Deprecated. Compares the row and timestamp of two keys |
static boolean |
matchingFamily(byte[] family,
byte[] column)
Deprecated. |
static byte[][] |
parseColumn(byte[] c)
Deprecated. |
void |
readFields(DataInput in)
Deprecated. |
void |
set(HStoreKey k)
Deprecated. Set the value of this HStoreKey from the supplied key |
void |
setColumn(byte[] c)
Deprecated. Change the value of the column in this key |
void |
setRow(byte[] newrow)
Deprecated. Change the value of the row key |
void |
setVersion(long timestamp)
Deprecated. Change the value of the timestamp field |
String |
toString()
Deprecated. |
void |
write(DataOutput out)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final char COLUMN_FAMILY_DELIMITER
public static final int ESTIMATED_HEAP_TAX
| Constructor Detail |
|---|
public HStoreKey()
public HStoreKey(byte[] row)
row - - row keypublic HStoreKey(String row)
row - - row key
public HStoreKey(byte[] row,
long timestamp)
row - row keytimestamp - timestamp value
public HStoreKey(String row,
String column)
row - row keycolumn - column key
public HStoreKey(byte[] row,
byte[] column)
row - row keycolumn - column key
public HStoreKey(String row,
String column,
long timestamp)
row - row keycolumn - column keytimestamp - timestamp value
public HStoreKey(byte[] row,
byte[] column,
long timestamp)
row - row keycolumn - column keytimestamp - timestamp valuepublic HStoreKey(HStoreKey other)
other - the source keypublic HStoreKey(ByteBuffer bb)
| Method Detail |
|---|
public void setRow(byte[] newrow)
newrow - new row key valuepublic void setColumn(byte[] c)
c - new column family valuepublic void setVersion(long timestamp)
timestamp - new timestamp valuepublic void set(HStoreKey k)
k - key value to copypublic byte[] getRow()
public byte[] getColumn()
public long getTimestamp()
public boolean matchesRowCol(HStoreKey other)
other - Key to compare against. Compares row and column.
matchesWithoutColumn(HStoreKey),
matchesRowFamily(HStoreKey)public boolean matchesWithoutColumn(HStoreKey other)
other - Key to copmare against. Compares row and timestamp.
othermatchesRowCol(HStoreKey),
matchesRowFamily(HStoreKey)public boolean matchesRowFamily(HStoreKey that)
that - Key to compare against. Compares row and column family
matchesRowCol(HStoreKey),
matchesWithoutColumn(HStoreKey)public String toString()
toString in class ObjectObject.toString()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()@Deprecated public int compareTo(HStoreKey o)
compareTo in interface Comparable<HStoreKey>o -
public static byte[] getFamily(byte[] column)
throws ColumnNameParseException
column -
column family prefix only
(Does not include the colon DELIMITER).
ColumnNameParseExceptionparseColumn(byte[])public static Integer getFamilyMapKey(byte[] column)
column -
public static boolean matchingFamily(byte[] family,
byte[] column)
family - column -
column has a family of family.public static byte[] addDelimiter(byte[] family)
family -
family plus the family delimiter.public static byte[] getQualifier(byte[] column)
column -
column qualifier suffix.parseColumn(byte[])
public static byte[][] parseColumn(byte[] c)
throws ColumnNameParseException
c - Column name
c and whose second element is the
column qualifier.
ColumnNameParseExceptionpublic static int getFamilyDelimiterIndex(byte[] b)
b -
public static boolean equalsTwoRowKeys(byte[] rowA,
byte[] rowB)
rowA - rowB -
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.WritableIOException
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic static int getSerializedSize(HStoreKey hsk)
hsk -
public long heapSize()
heapSize in interface HeapSize
public byte[] getBytes()
throws IOException
hsk gotten by running its
Writable.write(java.io.DataOutput) method.
IOException
public static byte[] getBytes(HStoreKey hsk)
throws IOException
hsk bytes.
Note, this method's implementation has changed. Used to just return
row and column. This is a customized version of
Writables.getBytes(Writable)
hsk - Instance
hsk gotten by running its
Writable.write(java.io.DataOutput) method.
IOException
public static byte[] getBytes(byte[] row)
throws IOException
row - Can't be null
IOException
public static byte[] getBytes(byte[] row,
byte[] column,
long ts)
throws IOException
row - Can't be nullcolumn - Can be nullts -
IOExceptionpublic static byte[] getRow(ByteBuffer bb)
bb - ByteBuffer that contains serialized HStoreKey
public static byte[] getColumn(ByteBuffer bb)
bb - ByteBuffer that contains serialized HStoreKey
public static long getTimestamp(ByteBuffer bb)
bb - ByteBuffer that contains serialized HStoreKey
public static HStoreKey create(ByteBuffer bb)
throws IOException
bb -
b.
IOException
public static HStoreKey create(byte[] b)
throws IOException
b - Serialized HStoreKey; a byte array with a row only in it won't do.
It must have all the vints denoting r/c/ts lengths.
b.
IOException
public static HStoreKey create(byte[] b,
int offset,
int length)
throws IOException
b - Serialized HStoreKeyoffset - length -
b.
IOException
protected static int compareRootRows(byte[] left,
int loffset,
int llength,
byte[] right,
int roffset,
int rlength)
protected static int compareMetaRows(byte[] left,
int loffset,
int llength,
byte[] right,
int roffset,
int rlength)
public static org.apache.hadoop.io.WritableComparator getWritableComparator(HRegionInfo hri)
hri -
public static HStoreKey.StoreKeyComparator getRawComparator(HRegionInfo hri)
hri -
public static HStoreKey.StoreKeyComparator getComparator(byte[] tablename)
tablename -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||