Class SAICodecUtils
java.lang.Object
org.apache.cassandra.index.sai.disk.v1.SAICodecUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcheckBlockSize(int blockSize, int minBlockSize, int maxBlockSize) static voidcheckFooter(org.apache.lucene.store.ChecksumIndexInput in) static voidcheckHeader(org.apache.lucene.store.DataInput in) static intnumBlocks(long size, int blockSize) static longreadVLong(org.apache.lucene.store.DataInput in) Same as DataInput.readVLong but supports negative valuesstatic voidvalidate(org.apache.lucene.store.IndexInput input) static voidvalidate(org.apache.lucene.store.IndexInput input, long footerPointer) static voidvalidateChecksum(org.apache.lucene.store.IndexInput input) SeeCodecUtil.checksumEntireFile(org.apache.lucene.store.IndexInput).static voidvalidateFooterAndResetPosition(org.apache.lucene.store.IndexInput in) static voidwriteFooter(org.apache.lucene.store.IndexOutput out) static voidwriteHeader(org.apache.lucene.store.IndexOutput out)
-
Field Details
-
FOOTER_POINTER
- See Also:
-
-
Constructor Details
-
SAICodecUtils
public SAICodecUtils()
-
-
Method Details
-
writeHeader
- Throws:
IOException
-
checkHeader
- Throws:
IOException
-
validate
- Throws:
IOException
-
validate
public static void validate(org.apache.lucene.store.IndexInput input, long footerPointer) throws IOException - Throws:
IOException
-
validateChecksum
SeeCodecUtil.checksumEntireFile(org.apache.lucene.store.IndexInput).- Parameters:
input- IndexInput to validate.- Throws:
IOException- if a corruption is detected.
-
checkBlockSize
public static int checkBlockSize(int blockSize, int minBlockSize, int maxBlockSize) -
numBlocks
public static int numBlocks(long size, int blockSize) -
readVLong
Same as DataInput.readVLong but supports negative values- Throws:
IOException
-