Package org.rocksdb
Class CompactionJobStats
- java.lang.Object
-
- org.rocksdb.AbstractNativeReference
-
- org.rocksdb.AbstractImmutableNativeReference
-
- org.rocksdb.RocksObject
-
- org.rocksdb.CompactionJobStats
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class CompactionJobStats extends RocksObject
-
-
Field Summary
-
Fields inherited from class org.rocksdb.RocksObject
nativeHandle_
-
Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_
-
-
Constructor Summary
Constructors Constructor Description CompactionJobStats()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(CompactionJobStats compactionJobStats)Aggregate the CompactionJobStats from another instance with this one.protected voiddisposeInternal(long handle)longelapsedMicros()Get the elapsed time in micro of this compaction.longfileFsyncNanos()Get the Time spent on file fsync.longfilePrepareWriteNanos()Get the Time spent on preparing file write (falocate, etc) Only populated ifColumnFamilyOptions.reportBgIoStats()is set.longfileRangeSyncNanos()Get the Time spent on sync file range.longfileWriteNanos()Get the Time spent on file's Append() call.booleanisManualCompaction()Determine if the compaction is a manual compaction.byte[]largestOutputKeyPrefix()Get the largest output key prefix.longnumCorruptKeys()Get the number of corrupt keys (ParseInternalKey returned false when applied to the key) encountered and written out.longnumExpiredDeletionRecords()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.longnumInputDeletionRecords()Get the number of deletion entries before compaction.longnumInputFiles()Get the number of compaction input files.longnumInputFilesAtOutputLevel()Get the number of compaction input files at the output level.longnumInputRecords()Get the number of compaction input records.longnumOutputFiles()Get the number of compaction output files.longnumOutputRecords()Get the number of compaction output records.longnumRecordsReplaced()Get the number of records being replaced by newer record associated with same key.longnumSingleDelFallthru()Get the number of single-deletes which do not meet a put.longnumSingleDelMismatch()Get the number of single-deletes which meet something other than a put.voidreset()Reset the stats.byte[]smallestOutputKeyPrefix()Get the smallest output key prefix.longtotalInputBytes()Get the size of the compaction input in bytes.longtotalInputRawKeyBytes()Get the sum of the uncompressed input keys in bytes.longtotalInputRawValueBytes()Get the sum of the uncompressed input values in bytes.longtotalOutputBytes()Get the size of the compaction output in bytes.-
Methods inherited from class org.rocksdb.RocksObject
disposeInternal, getNativeHandle
-
Methods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Methods inherited from class org.rocksdb.AbstractNativeReference
dispose, finalize
-
-
-
-
Method Detail
-
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 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
-
-