Java Code Examples for org.apache.hadoop.hbase.HConstants#EMPTY_BYTE_BUFFER
The following examples show how to use
org.apache.hadoop.hbase.HConstants#EMPTY_BYTE_BUFFER .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BufferedDataBlockEncoder.java From hbase with Apache License 2.0 | 6 votes |
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); }
Example 2
Source File: KeyOnlyFilter.java From hbase with Apache License 2.0 | 5 votes |
@Override public ByteBuffer getValueByteBuffer() { if (lenAsVal) { return ByteBuffer.wrap(Bytes.toBytes(cell.getValueLength())); } else { return HConstants.EMPTY_BYTE_BUFFER; } }
Example 3
Source File: KeyOnlyFilter.java From hbase with Apache License 2.0 | 4 votes |
@Override public ByteBuffer getTagsByteBuffer() { return HConstants.EMPTY_BYTE_BUFFER; }