Class SAICodecUtils

java.lang.Object
org.apache.cassandra.index.sai.disk.v1.SAICodecUtils

public class SAICodecUtils extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    checkBlockSize(int blockSize, int minBlockSize, int maxBlockSize)
     
    static void
    checkFooter(org.apache.lucene.store.ChecksumIndexInput in)
     
    static void
    checkHeader(org.apache.lucene.store.DataInput in)
     
    static int
    numBlocks(long size, int blockSize)
     
    static long
    readVLong(org.apache.lucene.store.DataInput in)
    Same as DataInput.readVLong but supports negative values
    static void
    validate(org.apache.lucene.store.IndexInput input)
     
    static void
    validate(org.apache.lucene.store.IndexInput input, long footerPointer)
     
    static void
    validateChecksum(org.apache.lucene.store.IndexInput input)
    See CodecUtil.checksumEntireFile(org.apache.lucene.store.IndexInput).
    static void
    validateFooterAndResetPosition(org.apache.lucene.store.IndexInput in)
     
    static void
    writeFooter(org.apache.lucene.store.IndexOutput out)
     
    static void
    writeHeader(org.apache.lucene.store.IndexOutput out)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • SAICodecUtils

      public SAICodecUtils()
  • Method Details

    • writeHeader

      public static void writeHeader(org.apache.lucene.store.IndexOutput out) throws IOException
      Throws:
      IOException
    • writeFooter

      public static void writeFooter(org.apache.lucene.store.IndexOutput out) throws IOException
      Throws:
      IOException
    • checkHeader

      public static void checkHeader(org.apache.lucene.store.DataInput in) throws IOException
      Throws:
      IOException
    • checkFooter

      public static void checkFooter(org.apache.lucene.store.ChecksumIndexInput in) throws IOException
      Throws:
      IOException
    • validate

      public static void validate(org.apache.lucene.store.IndexInput input) throws IOException
      Throws:
      IOException
    • validate

      public static void validate(org.apache.lucene.store.IndexInput input, long footerPointer) throws IOException
      Throws:
      IOException
    • validateChecksum

      public static void validateChecksum(org.apache.lucene.store.IndexInput input) throws IOException
      See CodecUtil.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

      public static long readVLong(org.apache.lucene.store.DataInput in) throws IOException
      Same as DataInput.readVLong but supports negative values
      Throws:
      IOException
    • validateFooterAndResetPosition

      public static void validateFooterAndResetPosition(org.apache.lucene.store.IndexInput in) throws IOException
      Throws:
      IOException