|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.HStoreKey
public class HStoreKey
A Key for a stored row
Constructor Summary | |
---|---|
HStoreKey()
Default constructor used in conjunction with Writable interface |
|
HStoreKey(HStoreKey other)
Construct a new HStoreKey from another |
|
HStoreKey(Text row)
Create an HStoreKey specifying only the row The column defaults to the empty string and the time stamp defaults to Long.MAX_VALUE |
|
HStoreKey(Text row,
long timestamp)
Create an HStoreKey specifying the row and timestamp The column name defaults to the empty string |
|
HStoreKey(Text row,
Text column)
Create an HStoreKey specifying the row and column names The timestamp defaults to Long.MAX_VALUE |
|
HStoreKey(Text row,
Text column,
long timestamp)
Create an HStoreKey specifying all the fields |
Method Summary | |
---|---|
int |
compareTo(Object o)
|
boolean |
equals(Object obj)
|
static Text |
extractFamily(Text col)
Extracts the column family name from a column For example, returns 'info' if the specified column was 'info:server' |
static Text |
extractFamily(Text col,
boolean withColon)
Extracts the column family name from a column For example, returns 'info' if the specified column was 'info:server' |
static Text |
extractQualifier(Text col)
Extracts the column qualifier, the portion that follows the colon (':') family/qualifier separator. |
Text |
getColumn()
|
Text |
getRow()
|
long |
getTimestamp()
|
int |
hashCode()
|
boolean |
matchesRowCol(HStoreKey other)
|
boolean |
matchesRowFamily(HStoreKey that)
|
boolean |
matchesWithoutColumn(HStoreKey other)
|
void |
readFields(DataInput in)
Reads the fields of this object from in . |
void |
set(HStoreKey k)
Set the value of this HStoreKey from the supplied key |
void |
setColumn(Text newcol)
Change the value of the column key |
void |
setRow(Text 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)
Writes the fields of this object to out . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HStoreKey()
public HStoreKey(Text row)
row
- - row keypublic HStoreKey(Text row, long timestamp)
row
- row keytimestamp
- timestamp valuepublic HStoreKey(Text row, Text column)
row
- row keycolumn
- column keypublic HStoreKey(Text row, Text column, long timestamp)
row
- row keycolumn
- column keytimestamp
- timestamp valuepublic HStoreKey(HStoreKey other)
other
- the source keyMethod Detail |
---|
public static Text extractFamily(Text col) throws InvalidColumnNameException
col
- name of column
InvalidColumnNameException
public static Text extractFamily(Text col, boolean withColon) throws InvalidColumnNameException
col
- name of columnwithColon
- if returned family name should include the ':' suffix.
InvalidColumnNameException
public static Text extractQualifier(Text col) throws InvalidColumnNameException
col
- name of column
InvalidColumnNameException
public void setRow(Text newrow)
newrow
- new row key valuepublic void setColumn(Text newcol)
newcol
- new column key valuepublic void setVersion(long timestamp)
timestamp
- new timestamp valuepublic void set(HStoreKey k)
k
- key value to copypublic Text getRow()
public Text 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.
other
matchesRowCol(HStoreKey)
,
matchesRowFamily(HStoreKey)
public boolean matchesRowFamily(HStoreKey that) throws InvalidColumnNameException
that
- Key to compare against. Compares row and column family
InvalidColumnNameException
matchesRowCol(HStoreKey)
,
matchesWithoutColumn(HStoreKey)
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(Object o)
compareTo
in interface Comparable
public void write(DataOutput out) throws IOException
Writable
out
.
write
in interface Writable
IOException
public void readFields(DataInput in) throws IOException
Writable
in
. For efficiency,
implementations should attempt to re-use storage in the existing object
where possible.
readFields
in interface Writable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |