public class BlockHeader extends Object implements Accountable
Holds the number of lines in the block.
Holds the base file pointers to apply delta base encoding to all the file
pointers in the block with DeltaBaseTermStateSerializer
.
Holds the offset to the details region of the block (the term states).
Holds the offset to the middle term of the block to divide the number of terms to scan by 2.
Modifier and Type | Field and Description |
---|---|
protected long |
baseDocsFP |
protected long |
basePayloadsFP |
protected long |
basePositionsFP |
protected int |
linesCount |
protected int |
middleLineIndex |
protected int |
middleLineOffset |
protected int |
termStatesBaseOffset |
Modifier | Constructor and Description |
---|---|
protected |
BlockHeader()
Empty constructor.
|
protected |
BlockHeader(int linesCount,
long baseDocsFP,
long basePositionsFP,
long basePayloadsFP,
int termStatesBaseOffset,
int middleLineOffset) |
Modifier and Type | Method and Description |
---|---|
long |
getBaseDocsFP() |
long |
getBasePayloadsFP() |
long |
getBasePositionsFP() |
int |
getLinesCount() |
int |
getMiddleLineIndex() |
int |
getMiddleLineOffset() |
int |
getTermStatesBaseOffset() |
long |
ramBytesUsed() |
static BlockHeader |
read(DataInput input,
BlockHeader reuse) |
protected BlockHeader |
reset(int linesCount,
long baseDocsFP,
long basePositionsFP,
long basePayloadsFP,
int termStatesBaseOffset,
int middleTermOffset) |
void |
write(DataOutput output) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildResources
protected int linesCount
protected long baseDocsFP
protected long basePositionsFP
protected long basePayloadsFP
protected int termStatesBaseOffset
protected int middleLineIndex
protected int middleLineOffset
protected BlockHeader(int linesCount, long baseDocsFP, long basePositionsFP, long basePayloadsFP, int termStatesBaseOffset, int middleLineOffset)
linesCount
- Number of lines in the block.baseDocsFP
- File pointer to the docs of the first term with docs in the block.basePositionsFP
- File pointer to the positions of the first term with positions in the block.basePayloadsFP
- File pointer to the payloads of the first term with payloads in the block.termStatesBaseOffset
- Offset to the details region of the block (the term states), relative to the block start.middleLineOffset
- Offset to the middle term of the block, relative to the block start.protected BlockHeader()
reset(int, long, long, long, int, int)
must be called before writing.protected BlockHeader reset(int linesCount, long baseDocsFP, long basePositionsFP, long basePayloadsFP, int termStatesBaseOffset, int middleTermOffset)
public int getLinesCount()
public int getMiddleLineIndex()
public int getMiddleLineOffset()
public int getTermStatesBaseOffset()
public long getBaseDocsFP()
public long getBasePositionsFP()
public long getBasePayloadsFP()
public void write(DataOutput output) throws IOException
IOException
public static BlockHeader read(DataInput input, BlockHeader reuse) throws IOException
IOException
public long ramBytesUsed()
ramBytesUsed
in interface Accountable
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.