Class ColumnCompletionMarkerUtil
java.lang.Object
org.apache.cassandra.index.sai.disk.v1.ColumnCompletionMarkerUtil
Utility class for creating and reading the column completion marker,
IndexComponent.COLUMN_COMPLETION_MARKER.
The file has a header and a footer, as written by SAICodecUtils.writeHeader(IndexOutput) and
SAICodecUtils.writeFooter(IndexOutput). The only content of the file is a single byte indicating whether the
column index is empty or not. If the index is empty the completion marker will be the only per-index component.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreate(IndexDescriptor descriptor, IndexIdentifier indexIdentifier, boolean isEmpty) Creates a column index completion marker for the specified column index, storing in it whether the index is empty.static booleanisEmptyIndex(IndexDescriptor descriptor, IndexIdentifier indexIdentifier) Reads the column index completion marker and returns whether if the index is empty.
-
Constructor Details
-
ColumnCompletionMarkerUtil
public ColumnCompletionMarkerUtil()
-
-
Method Details
-
create
public static void create(IndexDescriptor descriptor, IndexIdentifier indexIdentifier, boolean isEmpty) throws IOException Creates a column index completion marker for the specified column index, storing in it whether the index is empty.- Parameters:
descriptor- the index descriptorindexIdentifier- the column index identifierisEmpty- whether the index is empty- Throws:
IOException
-
isEmptyIndex
public static boolean isEmptyIndex(IndexDescriptor descriptor, IndexIdentifier indexIdentifier) throws IOException Reads the column index completion marker and returns whether if the index is empty.- Parameters:
descriptor- the index descriptorindexIdentifier- the column index identifier- Returns:
trueif the index is empty,falseotherwise.- Throws:
IOException
-