Class NumericIndexWriter
java.lang.Object
org.apache.cassandra.index.sai.disk.v1.bbtree.NumericIndexWriter
- All Implemented Interfaces:
SegmentWriter
Specialized writer for values, that builds them into a
BlockBalancedTreeWriter with auxiliary
posting lists on eligible tree levels.
Given a sorted input, the flush process is optimised because we don't need to buffer all point values to sort them.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNumericIndexWriter(IndexDescriptor indexDescriptor, IndexIdentifier indexIdentifier, int bytesPerValue) NumericIndexWriter(IndexDescriptor indexDescriptor, IndexIdentifier indexIdentifier, int maxPointsInLeafNode, int bytesPerValue) -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the number of rows written to the segmenttoString()writeCompleteSegment(Iterator<IndexEntry> iterator) Appends a set of terms and associated postings to their respective overall SSTable component files.
-
Field Details
-
MAX_POINTS_IN_LEAF_NODE
public static final int MAX_POINTS_IN_LEAF_NODE- See Also:
-
-
Constructor Details
-
NumericIndexWriter
public NumericIndexWriter(IndexDescriptor indexDescriptor, IndexIdentifier indexIdentifier, int bytesPerValue) -
NumericIndexWriter
public NumericIndexWriter(IndexDescriptor indexDescriptor, IndexIdentifier indexIdentifier, int maxPointsInLeafNode, int bytesPerValue)
-
-
Method Details
-
toString
-
writeCompleteSegment
public SegmentMetadata.ComponentMetadataMap writeCompleteSegment(Iterator<IndexEntry> iterator) throws IOException Description copied from interface:SegmentWriterAppends a set of terms and associated postings to their respective overall SSTable component files.- Specified by:
writeCompleteSegmentin interfaceSegmentWriter- Parameters:
iterator- anIteratorofIndexEntrys sorted in term order.- Returns:
- metadata describing the location of this inverted index in the overall SSTable terms and postings component files
- Throws:
IOException
-
getNumberOfRows
public long getNumberOfRows()Description copied from interface:SegmentWriterReturns the number of rows written to the segment- Specified by:
getNumberOfRowsin interfaceSegmentWriter- Returns:
- the number of rows
-