org.apache.hadoop.hbase.HConstants#EMPTY_BYTE_BUFFER源码实例Demo

下面列出了org.apache.hadoop.hbase.HConstants#EMPTY_BYTE_BUFFER 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: hbase   文件: BufferedDataBlockEncoder.java
private Cell toOffheapCell(ByteBuffer valAndTagsBuffer, int vOffset,
    int tagsLenSerializationSize) {
  ByteBuffer tagsBuf = HConstants.EMPTY_BYTE_BUFFER;
  int tOffset = 0;
  if (this.includeTags) {
    if (this.tagCompressionContext == null) {
      tagsBuf = valAndTagsBuffer;
      tOffset = vOffset + this.valueLength + tagsLenSerializationSize;
    } else {
      tagsBuf = ByteBuffer.wrap(Bytes.copy(tagsBuffer, 0, this.tagsLength));
      tOffset = 0;
    }
  }
  return new OffheapDecodedExtendedCell(
      ByteBuffer.wrap(Bytes.copy(keyBuffer, 0, this.keyLength)), currentKey.getRowLength(),
      currentKey.getFamilyOffset(), currentKey.getFamilyLength(),
      currentKey.getQualifierOffset(), currentKey.getQualifierLength(),
      currentKey.getTimestamp(), currentKey.getTypeByte(), valAndTagsBuffer, vOffset,
      this.valueLength, memstoreTS, tagsBuf, tOffset, this.tagsLength);
}
 
源代码2 项目: hbase   文件: KeyOnlyFilter.java
@Override
public ByteBuffer getValueByteBuffer() {
  if (lenAsVal) {
    return ByteBuffer.wrap(Bytes.toBytes(cell.getValueLength()));
  } else {
    return HConstants.EMPTY_BYTE_BUFFER;
  }
}
 
源代码3 项目: hbase   文件: KeyOnlyFilter.java
@Override
public ByteBuffer getTagsByteBuffer() {
  return HConstants.EMPTY_BYTE_BUFFER;
}