Package org.rocksdb

Class CompactionJobStats

All Implemented Interfaces:
AutoCloseable

public class CompactionJobStats extends RocksObject
  • Constructor Details

    • CompactionJobStats

      public CompactionJobStats()
  • Method Details

    • reset

      public void reset()
      Reset the stats.
    • add

      public void add(CompactionJobStats compactionJobStats)
      Aggregate the CompactionJobStats from another instance with this one.
      Parameters:
      compactionJobStats - another instance of stats.
    • elapsedMicros

      public long elapsedMicros()
      Get the elapsed time in micro of this compaction.
      Returns:
      the elapsed time in micro of this compaction.
    • numInputRecords

      public long numInputRecords()
      Get the number of compaction input records.
      Returns:
      the number of compaction input records.
    • numInputFiles

      public long numInputFiles()
      Get the number of compaction input files.
      Returns:
      the number of compaction input files.
    • numInputFilesAtOutputLevel

      public long numInputFilesAtOutputLevel()
      Get the number of compaction input files at the output level.
      Returns:
      the number of compaction input files at the output level.
    • numOutputRecords

      public long numOutputRecords()
      Get the number of compaction output records.
      Returns:
      the number of compaction output records.
    • numOutputFiles

      public long numOutputFiles()
      Get the number of compaction output files.
      Returns:
      the number of compaction output files.
    • isManualCompaction

      public boolean isManualCompaction()
      Determine if the compaction is a manual compaction.
      Returns:
      true if the compaction is a manual compaction, false otherwise.
    • totalInputBytes

      public long totalInputBytes()
      Get the size of the compaction input in bytes.
      Returns:
      the size of the compaction input in bytes.
    • totalOutputBytes

      public long totalOutputBytes()
      Get the size of the compaction output in bytes.
      Returns:
      the size of the compaction output in bytes.
    • numRecordsReplaced

      public long numRecordsReplaced()
      Get the number of records being replaced by newer record associated with same key. This could be a new value or a deletion entry for that key so this field sums up all updated and deleted keys.
      Returns:
      the number of records being replaced by newer record associated with same key.
    • totalInputRawKeyBytes

      public long totalInputRawKeyBytes()
      Get the sum of the uncompressed input keys in bytes.
      Returns:
      the sum of the uncompressed input keys in bytes.
    • totalInputRawValueBytes

      public long totalInputRawValueBytes()
      Get the sum of the uncompressed input values in bytes.
      Returns:
      the sum of the uncompressed input values in bytes.
    • numInputDeletionRecords

      public long numInputDeletionRecords()
      Get the number of deletion entries before compaction. Deletion entries can disappear after compaction because they expired.
      Returns:
      the number of deletion entries before compaction.
    • numExpiredDeletionRecords

      public long numExpiredDeletionRecords()
      Get the number of deletion records that were found obsolete and discarded because it is not possible to delete any more keys with this entry. (i.e. all possible deletions resulting from it have been completed)
      Returns:
      the number of deletion records that were found obsolete and discarded.
    • numCorruptKeys

      public long numCorruptKeys()
      Get the number of corrupt keys (ParseInternalKey returned false when applied to the key) encountered and written out.
      Returns:
      the number of corrupt keys.
    • fileWriteNanos

      public long fileWriteNanos()
      Get the Time spent on file's Append() call. Only populated if ColumnFamilyOptions.reportBgIoStats() is set.
      Returns:
      the Time spent on file's Append() call.
    • fileRangeSyncNanos

      public long fileRangeSyncNanos()
      Get the Time spent on sync file range. Only populated if ColumnFamilyOptions.reportBgIoStats() is set.
      Returns:
      the Time spent on sync file range.
    • fileFsyncNanos

      public long fileFsyncNanos()
      Get the Time spent on file fsync. Only populated if ColumnFamilyOptions.reportBgIoStats() is set.
      Returns:
      the Time spent on file fsync.
    • filePrepareWriteNanos

      public long filePrepareWriteNanos()
      Get the Time spent on preparing file write (falocate, etc) Only populated if ColumnFamilyOptions.reportBgIoStats() is set.
      Returns:
      the Time spent on preparing file write (falocate, etc).
    • smallestOutputKeyPrefix

      public byte[] smallestOutputKeyPrefix()
      Get the smallest output key prefix.
      Returns:
      the smallest output key prefix.
    • largestOutputKeyPrefix

      public byte[] largestOutputKeyPrefix()
      Get the largest output key prefix.
      Returns:
      the smallest output key prefix.
    • numSingleDelFallthru

      @Experimental("Performance optimization for a very specific workload") public long numSingleDelFallthru()
      Get the number of single-deletes which do not meet a put.
      Returns:
      number of single-deletes which do not meet a put.
    • numSingleDelMismatch

      @Experimental("Performance optimization for a very specific workload") public long numSingleDelMismatch()
      Get the number of single-deletes which meet something other than a put.
      Returns:
      the number of single-deletes which meet something other than a put.
    • disposeInternal

      protected void disposeInternal(long handle)
      Specified by:
      disposeInternal in class RocksObject