public class FilterBlockBuilder extends Object
[ i*base ... (i+1)*base-1 ]
Currently, "base" is 2KB. So for example, if blocks X and Y start in the range [ 0KB .. 2KB-1 ], all of the keys in X and Y will be converted to a filter by calling FilterPolicy::CreateFilter(), and the resulting filter will be stored as the first filter in the filter block.
The filter block is formatted as follows:
[filter 0] [filter 1] [filter 2] ... [filter N-1]
[offset of filter 0] : 4 bytes [offset of filter 1] : 4 bytes [offset of filter 2] : 4 bytes ... [offset of filter N-1] : 4 bytes
[offset of beginning of offset array] : 4 bytes lg(base) : 1 byte
| Constructor and Description |
|---|
FilterBlockBuilder(FilterPolicy policy) |
| Modifier and Type | Method and Description |
|---|---|
void |
addKey(Slice key) |
Slice |
finish() |
String |
name() |
void |
startBlock(long blockOffset) |
public FilterBlockBuilder(FilterPolicy policy)
Copyright © 2011–2020. All rights reserved.