|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.io.Cell
public class Cell
Cell - Used to transport a cell value (byte[]) and the timestamp it was stored with together as a result for get and getRow methods. This promotes the timestamp of a cell to a first-class value, making it easy to take note of temporal data. Cell is used all the way from HStore up to HTable.
Field Summary | |
---|---|
protected SortedMap<Long,byte[]> |
valueMap
|
Constructor Summary | |
---|---|
Cell()
For Writable compatibility |
|
Cell(byte[][] vals,
long[] ts)
|
|
Cell(byte[] value,
long timestamp)
Create a new Cell with a given value and timestamp. |
|
Cell(String[] vals,
long[] ts)
|
|
Cell(String value,
long timestamp)
Create a new Cell with a given value and timestamp. |
Method Summary | |
---|---|
void |
add(byte[] val,
long ts)
Add a new timestamp and value to this cell, provided timestamp does not already exist. |
int |
getNumValues()
|
long |
getTimestamp()
|
byte[] |
getValue()
|
Iterator<Map.Entry<Long,byte[]>> |
iterator()
|
void |
readFields(DataInput in)
|
String |
toString()
|
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final SortedMap<Long,byte[]> valueMap
Constructor Detail |
---|
public Cell()
public Cell(String value, long timestamp)
value
- timestamp
- public Cell(byte[] value, long timestamp)
value
- timestamp
- public Cell(String[] vals, long[] ts)
vals
- array of valuests
- array of timestampspublic Cell(byte[][] vals, long[] ts)
vals
- array of valuests
- array of timestampsMethod Detail |
---|
public byte[] getValue()
public long getTimestamp()
public int getNumValues()
public void add(byte[] val, long ts)
val
- valuets
- timestamppublic String toString()
toString
in class Object
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public Iterator<Map.Entry<Long,byte[]>> iterator()
iterator
in interface Iterable<Map.Entry<Long,byte[]>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |