private static final class Mutation.CellWrapper extends Object implements ExtendedCell
Modifier and Type | Field and Description |
---|---|
private Cell |
cell |
private static long |
FIXED_OVERHEAD |
private long |
sequenceId |
private long |
timestamp |
CELL_NOT_BASED_ON_CHUNK
MAX_TAGS_LENGTH
Constructor and Description |
---|
CellWrapper(Cell cell) |
Modifier and Type | Method and Description |
---|---|
byte[] |
cloneTags()
Allows cloning the tags in the cell to a new byte[]
|
byte[] |
getFamilyArray()
Contiguous bytes composed of legal HDFS filename characters which may start at any index in the
containing array.
|
byte |
getFamilyLength() |
int |
getFamilyOffset() |
byte[] |
getQualifierArray()
Contiguous raw bytes that may start at any index in the containing array.
|
int |
getQualifierLength() |
int |
getQualifierOffset() |
byte[] |
getRowArray()
Contiguous raw bytes that may start at any index in the containing array.
|
short |
getRowLength() |
int |
getRowOffset() |
long |
getSequenceId()
A region-specific unique monotonically increasing sequence ID given to each Cell.
|
Optional<Tag> |
getTag(byte type)
Returns the specific tag of the given type
|
Iterator<Tag> |
getTags()
Creates a list of tags in the current cell
|
byte[] |
getTagsArray()
Contiguous raw bytes representing tags that may start at any index in the containing array.
|
int |
getTagsLength()
HBase internally uses 2 bytes to store tags length in Cell.
|
int |
getTagsOffset() |
long |
getTimestamp() |
byte |
getTypeByte() |
byte[] |
getValueArray()
Contiguous raw bytes that may start at any index in the containing array.
|
int |
getValueLength() |
int |
getValueOffset() |
private long |
heapOverhead() |
long |
heapSize() |
void |
setSequenceId(long seqId)
Sets with the given seqId.
|
void |
setTimestamp(byte[] ts)
Sets with the given timestamp.
|
void |
setTimestamp(long ts)
Sets with the given timestamp.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deepClone, getChunkId, getSerializedSize, getSerializedSize, write, write
checkForTagsLength
private static final long FIXED_OVERHEAD
private long sequenceId
private long timestamp
CellWrapper(Cell cell)
public void setSequenceId(long seqId)
ExtendedCell
setSequenceId
in interface ExtendedCell
seqId
- sequence IDpublic void setTimestamp(long ts)
ExtendedCell
setTimestamp
in interface ExtendedCell
ts
- timestamppublic void setTimestamp(byte[] ts)
ExtendedCell
setTimestamp
in interface ExtendedCell
ts
- buffer containing the timestamp valuepublic long getSequenceId()
ExtendedCell
HConstants.KEEP_SEQID_PERIOD
days, but generally becomes irrelevant after the cell's
row is no longer involved in any operations that require strict consistency.getSequenceId
in interface Cell
getSequenceId
in interface ExtendedCell
public byte[] getValueArray()
Cell
getValueArray
in interface Cell
public int getValueOffset()
getValueOffset
in interface Cell
public int getValueLength()
getValueLength
in interface Cell
public byte[] getTagsArray()
ExtendedCell
getTagsArray
in interface Cell
getTagsArray
in interface ExtendedCell
public int getTagsOffset()
getTagsOffset
in interface Cell
getTagsOffset
in interface ExtendedCell
public int getTagsLength()
ExtendedCell
getTagsLength
in interface Cell
getTagsLength
in interface ExtendedCell
public byte[] getRowArray()
Cell
getRowArray
in interface Cell
public int getRowOffset()
getRowOffset
in interface Cell
public short getRowLength()
getRowLength
in interface Cell
public byte[] getFamilyArray()
Cell
getFamilyArray
in interface Cell
public int getFamilyOffset()
getFamilyOffset
in interface Cell
public byte getFamilyLength()
getFamilyLength
in interface Cell
public byte[] getQualifierArray()
Cell
getQualifierArray
in interface Cell
public int getQualifierOffset()
getQualifierOffset
in interface Cell
public int getQualifierLength()
getQualifierLength
in interface Cell
public long getTimestamp()
getTimestamp
in interface Cell
public byte getTypeByte()
getTypeByte
in interface Cell
getTypeByte
in interface ExtendedCell
public Optional<Tag> getTag(byte type)
RawCell
public Iterator<Tag> getTags()
RawCell
public byte[] cloneTags()
RawCell
private long heapOverhead()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.