HBASE-13387 Add ByteBufferedCell an extension to Cell - addendum.

This commit is contained in:
anoopsjohn 2015-07-10 15:03:07 +05:30
parent ff122f80b9
commit bff911a8e8
2 changed files with 20 additions and 20 deletions

View File

@ -36,50 +36,50 @@ public abstract class ByteBufferedCell implements Cell {
/**
* @return The {@link ByteBuffer} containing the row bytes.
*/
abstract ByteBuffer getRowByteBuffer();
public abstract ByteBuffer getRowByteBuffer();
/**
* @return Position in the {@link ByteBuffer} where row bytes start
*/
abstract int getRowPositionInByteBuffer();
public abstract int getRowPositionInByteBuffer();
/**
* @return The {@link ByteBuffer} containing the column family bytes.
*/
abstract ByteBuffer getFamilyByteBuffer();
public abstract ByteBuffer getFamilyByteBuffer();
/**
* @return Position in the {@link ByteBuffer} where column family bytes start
*/
abstract int getFamilyPositionInByteBuffer();
public abstract int getFamilyPositionInByteBuffer();
/**
* @return The {@link ByteBuffer} containing the column qualifier bytes.
*/
abstract ByteBuffer getQualifierByteBuffer();
public abstract ByteBuffer getQualifierByteBuffer();
/**
* @return Position in the {@link ByteBuffer} where column qualifier bytes start
*/
abstract int getQualifierPositionInByteBuffer();
public abstract int getQualifierPositionInByteBuffer();
/**
* @return The {@link ByteBuffer} containing the value bytes.
*/
abstract ByteBuffer getValueByteBuffer();
public abstract ByteBuffer getValueByteBuffer();
/**
* @return Position in the {@link ByteBuffer} where value bytes start
*/
abstract int getValuePositionInByteBuffer();
public abstract int getValuePositionInByteBuffer();
/**
* @return The {@link ByteBuffer} containing the tag bytes.
*/
abstract ByteBuffer getTagsByteBuffer();
public abstract ByteBuffer getTagsByteBuffer();
/**
* @return Position in the {@link ByteBuffer} where tag bytes start
*/
abstract int getTagsPositionInByteBuffer();
public abstract int getTagsPositionInByteBuffer();
}

View File

@ -660,52 +660,52 @@ public class TestCellUtil {
}
@Override
ByteBuffer getRowByteBuffer() {
public ByteBuffer getRowByteBuffer() {
return this.buffer;
}
@Override
int getRowPositionInByteBuffer() {
public int getRowPositionInByteBuffer() {
return this.offset + KeyValue.ROW_KEY_OFFSET;
}
@Override
ByteBuffer getFamilyByteBuffer() {
public ByteBuffer getFamilyByteBuffer() {
return this.buffer;
}
@Override
int getFamilyPositionInByteBuffer() {
public int getFamilyPositionInByteBuffer() {
return this.offset + KeyValue.ROW_KEY_OFFSET + getRowLength() + Bytes.SIZEOF_BYTE;
}
@Override
ByteBuffer getQualifierByteBuffer() {
public ByteBuffer getQualifierByteBuffer() {
return this.buffer;
}
@Override
int getQualifierPositionInByteBuffer() {
public int getQualifierPositionInByteBuffer() {
return getFamilyPositionInByteBuffer() + getFamilyLength();
}
@Override
ByteBuffer getValueByteBuffer() {
public ByteBuffer getValueByteBuffer() {
return this.buffer;
}
@Override
int getValuePositionInByteBuffer() {
public int getValuePositionInByteBuffer() {
return this.offset + KeyValue.ROW_OFFSET + getKeyLength();
}
@Override
ByteBuffer getTagsByteBuffer() {
public ByteBuffer getTagsByteBuffer() {
return this.buffer;
}
@Override
int getTagsPositionInByteBuffer() {
public int getTagsPositionInByteBuffer() {
int tagsLen = getTagsLength();
if (tagsLen == 0) {
return this.offset + this.length;