Package org.rocksdb

Class SstFileMetaData

java.lang.Object
org.rocksdb.SstFileMetaData
Direct Known Subclasses:
LiveFileMetaData

public class SstFileMetaData extends Object
The metadata that describes a SST file.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    SstFileMetaData(String fileName, String path, long size, long smallestSeqno, long largestSeqno, byte[] smallestKey, byte[] largestKey, long numReadsSampled, boolean beingCompacted, long numEntries, long numDeletions, byte[] fileChecksum)
    Called from JNI C++
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if the file is currently being compacted.
    byte[]
    Get the full file checksum iff full file checksum is enabled.
    Get the name of the file.
    byte[]
    Get the largest user defined key in the file.
    long
    Get the largest sequence number in file.
    long
    Get the number of deletions.
    long
    Get the number of entries.
    long
    Get the number of times the file has been read.
    Get the full path where the file locates.
    long
    Get the file size in bytes.
    byte[]
    Get the smallest user defined key in the file.
    long
    Get the smallest sequence number in file.

    Methods inherited from class java.lang.Object

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

    • SstFileMetaData

      protected SstFileMetaData(String fileName, String path, long size, long smallestSeqno, long largestSeqno, byte[] smallestKey, byte[] largestKey, long numReadsSampled, boolean beingCompacted, long numEntries, long numDeletions, byte[] fileChecksum)
      Called from JNI C++
      Parameters:
      fileName - the file name
      path - the file path
      size - the size of the file
      smallestSeqno - the smallest sequence number
      largestSeqno - the largest sequence number
      smallestKey - the smallest key
      largestKey - the largest key
      numReadsSampled - the number of reads sampled
      beingCompacted - true if the file is being compacted, false otherwise
      numEntries - the number of entries
      numDeletions - the number of deletions
      fileChecksum - the full file checksum (if enabled)
  • Method Details

    • fileName

      public String fileName()
      Get the name of the file.
      Returns:
      the name of the file.
    • path

      public String path()
      Get the full path where the file locates.
      Returns:
      the full path
    • size

      public long size()
      Get the file size in bytes.
      Returns:
      file size
    • smallestSeqno

      public long smallestSeqno()
      Get the smallest sequence number in file.
      Returns:
      the smallest sequence number
    • largestSeqno

      public long largestSeqno()
      Get the largest sequence number in file.
      Returns:
      the largest sequence number
    • smallestKey

      public byte[] smallestKey()
      Get the smallest user defined key in the file.
      Returns:
      the smallest user defined key
    • largestKey

      public byte[] largestKey()
      Get the largest user defined key in the file.
      Returns:
      the largest user defined key
    • numReadsSampled

      public long numReadsSampled()
      Get the number of times the file has been read.
      Returns:
      the number of times the file has been read
    • beingCompacted

      public boolean beingCompacted()
      Returns true if the file is currently being compacted.
      Returns:
      true if the file is currently being compacted, false otherwise.
    • numEntries

      public long numEntries()
      Get the number of entries.
      Returns:
      the number of entries.
    • numDeletions

      public long numDeletions()
      Get the number of deletions.
      Returns:
      the number of deletions.
    • fileChecksum

      public byte[] fileChecksum()
      Get the full file checksum iff full file checksum is enabled.
      Returns:
      the file's checksum