Package org.rocksdb
Class CompactionJobStats
java.lang.Object
org.rocksdb.AbstractNativeReference
org.rocksdb.AbstractImmutableNativeReference
org.rocksdb.RocksObject
org.rocksdb.CompactionJobStats
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
Fields inherited from class org.rocksdb.RocksObject
nativeHandle_Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_ -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(CompactionJobStats compactionJobStats) Aggregate the CompactionJobStats from another instance with this one.protected voiddisposeInternal(long handle) longGet the elapsed time in micro of this compaction.longGet the Time spent on file fsync.longGet the Time spent on preparing file write (falocate, etc) Only populated ifColumnFamilyOptions.reportBgIoStats()is set.longGet the Time spent on sync file range.longGet the Time spent on file's Append() call.booleanDetermine if the compaction is a manual compaction.byte[]Get the largest output key prefix.longGet the number of corrupt keys (ParseInternalKey returned false when applied to the key) encountered and written out.longGet the number of deletion records that were found obsolete and discarded because it is not possible to delete any more keys with this entry.longGet the number of deletion entries before compaction.longGet the number of compaction input files.longGet the number of compaction input files at the output level.longGet the number of compaction input records.longGet the number of compaction output files.longGet the number of compaction output records.longGet the number of records being replaced by newer record associated with same key.longGet the number of single-deletes which do not meet a put.longGet the number of single-deletes which meet something other than a put.voidreset()Reset the stats.byte[]Get the smallest output key prefix.longGet the size of the compaction input in bytes.longGet the sum of the uncompressed input keys in bytes.longGet the sum of the uncompressed input values in bytes.longGet the size of the compaction output in bytes.Methods inherited from class org.rocksdb.RocksObject
disposeInternal, getNativeHandleMethods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Constructor Details
-
CompactionJobStats
public CompactionJobStats()
-
-
Method Details
-
reset
public void reset()Reset the stats. -
add
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 ifColumnFamilyOptions.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 ifColumnFamilyOptions.reportBgIoStats()is set.- Returns:
- the Time spent on sync file range.
-
fileFsyncNanos
public long fileFsyncNanos()Get the Time spent on file fsync. Only populated ifColumnFamilyOptions.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 ifColumnFamilyOptions.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:
disposeInternalin classRocksObject
-