|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.HStoreKey
org.apache.hadoop.hbase.regionserver.BeforeThisStoreKey
public class BeforeThisStoreKey
Pass this class into MapFile
.getClosest when
searching for the key that comes BEFORE this one but NOT this one. THis
class will return > 0 when asked to compare against itself rather than 0.
This is a hack for case where getClosest returns a deleted key and we want
to get the previous. Can't unless use use this class; it'll just keep
returning us the deleted key (getClosest gets exact or nearest before when
you pass true argument). TODO: Throw this class away when MapFile has
a real 'previous' method. See HBASE-751.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.HStoreKey |
---|
HStoreKey.HStoreKeyWritableComparator |
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hbase.HStoreKey |
---|
COLUMN_FAMILY_DELIMITER |
Constructor Summary | |
---|---|
BeforeThisStoreKey(HStoreKey beforeThisKey)
|
Method Summary | |
---|---|
int |
compareTo(HStoreKey o)
|
boolean |
equals(Object obj)
|
byte[] |
getColumn()
|
HRegionInfo |
getHRegionInfo()
|
byte[] |
getRow()
|
long |
getSize()
|
long |
getTimestamp()
|
int |
hashCode()
|
boolean |
matchesRowCol(HStoreKey other)
Compares the row and column of two keys |
boolean |
matchesRowFamily(HStoreKey that)
Compares the row and column family of two keys |
boolean |
matchesWithoutColumn(HStoreKey other)
Compares the row and timestamp of two keys |
void |
readFields(DataInput in)
|
void |
set(HStoreKey k)
Set the value of this HStoreKey from the supplied key |
void |
setColumn(byte[] c)
Change the value of the column in this key |
void |
setHRegionInfo(HRegionInfo hri)
|
void |
setRow(byte[] newrow)
Change the value of the row key |
void |
setVersion(long timestamp)
Change the value of the timestamp field |
String |
toString()
|
void |
write(DataOutput out)
|
Methods inherited from class org.apache.hadoop.hbase.HStoreKey |
---|
addDelimiter, compareTwoRowKeys, equalsTwoRowKeys, getBytes, getFamily, getFamilyDelimiterIndex, getFamilyMapKey, getQualifier, matchingFamily, parseColumn |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BeforeThisStoreKey(HStoreKey beforeThisKey)
beforeThisKey
- Method Detail |
---|
public int compareTo(HStoreKey o)
compareTo
in interface Comparable<HStoreKey>
compareTo
in class HStoreKey
public boolean equals(Object obj)
equals
in class HStoreKey
public byte[] getColumn()
getColumn
in class HStoreKey
public byte[] getRow()
getRow
in class HStoreKey
public long getSize()
getSize
in class HStoreKey
public long getTimestamp()
getTimestamp
in class HStoreKey
public int hashCode()
hashCode
in class HStoreKey
public boolean matchesRowCol(HStoreKey other)
HStoreKey
matchesRowCol
in class HStoreKey
other
- Key to compare against. Compares row and column.
HStoreKey.matchesWithoutColumn(HStoreKey)
,
HStoreKey.matchesRowFamily(HStoreKey)
public boolean matchesRowFamily(HStoreKey that)
HStoreKey
matchesRowFamily
in class HStoreKey
that
- Key to compare against. Compares row and column family
HStoreKey.matchesRowCol(HStoreKey)
,
HStoreKey.matchesWithoutColumn(HStoreKey)
public boolean matchesWithoutColumn(HStoreKey other)
HStoreKey
matchesWithoutColumn
in class HStoreKey
other
- Key to copmare against. Compares row and timestamp.
other
HStoreKey.matchesRowCol(HStoreKey)
,
HStoreKey.matchesRowFamily(HStoreKey)
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class HStoreKey
IOException
public void set(HStoreKey k)
HStoreKey
set
in class HStoreKey
k
- key value to copypublic void setColumn(byte[] c)
HStoreKey
setColumn
in class HStoreKey
c
- new column family valuepublic void setRow(byte[] newrow)
HStoreKey
setRow
in class HStoreKey
newrow
- new row key valuepublic void setVersion(long timestamp)
HStoreKey
setVersion
in class HStoreKey
timestamp
- new timestamp valuepublic String toString()
toString
in class HStoreKey
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class HStoreKey
IOException
public HRegionInfo getHRegionInfo()
getHRegionInfo
in class HStoreKey
public void setHRegionInfo(HRegionInfo hri)
setHRegionInfo
in class HStoreKey
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |