org.apache.hadoop.hbase.codec.prefixtree.decode
Class PrefixTreeCell

java.lang.Object
  extended by org.apache.hadoop.hbase.codec.prefixtree.decode.PrefixTreeCell
All Implemented Interfaces:
Comparable<Cell>, Cell
Direct Known Subclasses:
PrefixTreeArrayScanner

@InterfaceAudience.Private
public class PrefixTreeCell
extends Object
implements Cell, Comparable<Cell>

As the PrefixTreeArrayScanner moves through the tree bytes, it changes the values in the fields of this class so that Cell logic can be applied, but without allocating new memory for every Cell iterated through.


Field Summary
protected  int absoluteValueOffset
           
protected  byte[] block
          fields
static KeyValue.Type DEFAULT_TYPE
           
protected  byte[] familyBuffer
           
protected  int familyLength
           
protected  int familyOffset
           
protected  boolean includeMvccVersion
           
protected  Long mvccVersion
           
protected  byte[] qualifierBuffer
           
protected  int qualifierLength
           
protected  int qualifierOffset
           
protected  byte[] rowBuffer
           
protected  int rowLength
           
protected  byte[] tagsBuffer
           
protected  int tagsLength
           
protected  int tagsOffset
           
protected  Long timestamp
           
protected  KeyValue.Type type
           
static KeyValue.Type[] TYPES
          static
protected  int valueLength
           
 
Constructor Summary
PrefixTreeCell()
           
 
Method Summary
 int compareTo(Cell other)
           
 boolean equals(Object obj)
           
 byte[] getFamily()
           
 byte[] getFamilyArray()
           
 byte getFamilyLength()
           
 int getFamilyOffset()
           
protected  String getKeyValueString()
          Need this separate method so we can call it from subclasses' toString() methods
 long getMvccVersion()
           
 byte[] getQualifier()
           
 byte[] getQualifierArray()
           
 int getQualifierLength()
           
 int getQualifierOffset()
           
 byte[] getRow()
           
 byte[] getRowArray()
           
 short getRowLength()
           
 int getRowOffset()
           
 byte[] getTagsArray()
           
 short getTagsLength()
          Deprecated. 
 int getTagsLengthUnsigned()
          Deprecated. 
 int getTagsOffset()
           
 long getTimestamp()
           
 byte getTypeByte()
           
 byte[] getValue()
           
 byte[] getValueArray()
           
 int getValueLength()
           
 int getValueOffset()
           
 int hashCode()
           
 String toString()
          For debugging.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPES

public static final KeyValue.Type[] TYPES
static


DEFAULT_TYPE

public static final KeyValue.Type DEFAULT_TYPE

block

protected byte[] block
fields


includeMvccVersion

protected boolean includeMvccVersion

rowBuffer

protected byte[] rowBuffer

rowLength

protected int rowLength

familyBuffer

protected byte[] familyBuffer

familyOffset

protected int familyOffset

familyLength

protected int familyLength

qualifierBuffer

protected byte[] qualifierBuffer

qualifierOffset

protected int qualifierOffset

qualifierLength

protected int qualifierLength

timestamp

protected Long timestamp

mvccVersion

protected Long mvccVersion

type

protected KeyValue.Type type

absoluteValueOffset

protected int absoluteValueOffset

valueLength

protected int valueLength

tagsBuffer

protected byte[] tagsBuffer

tagsOffset

protected int tagsOffset

tagsLength

protected int tagsLength
Constructor Detail

PrefixTreeCell

public PrefixTreeCell()
Method Detail

toString

public String toString()
For debugging. Currently creates new KeyValue to utilize its toString() method.

Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Cell other)
Specified by:
compareTo in interface Comparable<Cell>

getTimestamp

public long getTimestamp()
Specified by:
getTimestamp in interface Cell

getMvccVersion

public long getMvccVersion()
Specified by:
getMvccVersion in interface Cell

getValueLength

public int getValueLength()
Specified by:
getValueLength in interface Cell

getRowArray

public byte[] getRowArray()
Specified by:
getRowArray in interface Cell

getRowOffset

public int getRowOffset()
Specified by:
getRowOffset in interface Cell

getRowLength

public short getRowLength()
Specified by:
getRowLength in interface Cell

getFamilyArray

public byte[] getFamilyArray()
Specified by:
getFamilyArray in interface Cell

getFamilyOffset

public int getFamilyOffset()
Specified by:
getFamilyOffset in interface Cell

getFamilyLength

public byte getFamilyLength()
Specified by:
getFamilyLength in interface Cell

getQualifierArray

public byte[] getQualifierArray()
Specified by:
getQualifierArray in interface Cell

getQualifierOffset

public int getQualifierOffset()
Specified by:
getQualifierOffset in interface Cell

getQualifierLength

public int getQualifierLength()
Specified by:
getQualifierLength in interface Cell

getValueArray

public byte[] getValueArray()
Specified by:
getValueArray in interface Cell

getValueOffset

public int getValueOffset()
Specified by:
getValueOffset in interface Cell

getTypeByte

public byte getTypeByte()
Specified by:
getTypeByte in interface Cell

getValue

public byte[] getValue()
Specified by:
getValue in interface Cell

getFamily

public byte[] getFamily()
Specified by:
getFamily in interface Cell

getQualifier

public byte[] getQualifier()
Specified by:
getQualifier in interface Cell

getRow

public byte[] getRow()
Specified by:
getRow in interface Cell

getKeyValueString

protected String getKeyValueString()
Need this separate method so we can call it from subclasses' toString() methods


getTagsOffset

public int getTagsOffset()
Specified by:
getTagsOffset in interface Cell

getTagsLengthUnsigned

@Deprecated
public int getTagsLengthUnsigned()
Deprecated. 

Specified by:
getTagsLengthUnsigned in interface Cell

getTagsLength

@Deprecated
public short getTagsLength()
Deprecated. 

Specified by:
getTagsLength in interface Cell

getTagsArray

public byte[] getTagsArray()
Specified by:
getTagsArray in interface Cell


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.