Class RocksDBNativeMetricOptions

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    RocksDBNativeMetricOptions

    @PublicEvolving
    public class RocksDBNativeMetricOptions
    extends Object
    implements Serializable
    Enable which RocksDB metrics to forward to Flink's metrics reporter.

    Property based metrics would report at the column family level and return unsigned long values.

    Statistics based metrics would report at the database level, it can return ticker or histogram kind results.

    Properties and doc comments are taken from RocksDB documentation. See db.h for more information.

    See Also:
    Serialized Form
    • Constructor Detail

      • RocksDBNativeMetricOptions

        public RocksDBNativeMetricOptions()
    • Method Detail

      • enableNumImmutableMemTable

        public void enableNumImmutableMemTable()
        Returns number of immutable memtables that have not yet been flushed.
      • enableMemTableFlushPending

        public void enableMemTableFlushPending()
        Returns 1 if a memtable flush is pending; otherwise, returns 0.
      • enableCompactionPending

        public void enableCompactionPending()
        Returns 1 if at least one compaction is pending; otherwise, returns 0.
      • enableBackgroundErrors

        public void enableBackgroundErrors()
        Returns accumulated number of background errors.
      • enableCurSizeActiveMemTable

        public void enableCurSizeActiveMemTable()
        Returns approximate size of active memtable (bytes).
      • enableCurSizeAllMemTables

        public void enableCurSizeAllMemTables()
        Returns approximate size of active and unflushed immutable memtables (bytes).
      • enableSizeAllMemTables

        public void enableSizeAllMemTables()
        Returns approximate size of active, unflushed immutable, and pinned immutable memtables (bytes).
      • enableNumEntriesActiveMemTable

        public void enableNumEntriesActiveMemTable()
        Returns total number of entries in the active memtable.
      • enableNumEntriesImmMemTables

        public void enableNumEntriesImmMemTables()
        Returns total number of entries in the unflushed immutable memtables.
      • enableNumDeletesActiveMemTable

        public void enableNumDeletesActiveMemTable()
        Returns total number of delete entries in the active memtable.
      • enableNumDeletesImmMemTables

        public void enableNumDeletesImmMemTables()
        Returns total number of delete entries in the unflushed immutable memtables.
      • enableEstimateNumKeys

        public void enableEstimateNumKeys()
        Returns estimated number of total keys in the active and unflushed immutable memtables and storage.
      • enableEstimateTableReadersMem

        public void enableEstimateTableReadersMem()
        Returns estimated memory used for reading SST tables, excluding memory used in block cache (e.g.,filter and index blocks).
      • enableNumSnapshots

        public void enableNumSnapshots()
        Returns number of unreleased snapshots of the database.
      • enableNumLiveVersions

        public void enableNumLiveVersions()
        Returns number of live versions. `Version` is an internal data structure. See version_set.h for details. More live versions often mean more SST files are held from being deleted, by iterators or unfinished compactions.
      • enableEstimateLiveDataSize

        public void enableEstimateLiveDataSize()
        Returns an estimate of the amount of live data in bytes.
      • enableTotalSstFilesSize

        public void enableTotalSstFilesSize()
        Returns total size (bytes) of all SST files. WARNING: may slow down online queries if there are too many files.
      • enableLiveSstFilesSize

        public void enableLiveSstFilesSize()
      • enableEstimatePendingCompactionBytes

        public void enableEstimatePendingCompactionBytes()
        Returns estimated total number of bytes compaction needs to rewrite to get all levels down to under target size. Not valid for other compactions than level-based.
      • enableNumRunningCompactions

        public void enableNumRunningCompactions()
        Returns the number of currently running compactions.
      • enableNumRunningFlushes

        public void enableNumRunningFlushes()
        Returns the number of currently running flushes.
      • enableActualDelayedWriteRate

        public void enableActualDelayedWriteRate()
        Returns the current actual delayed write rate. 0 means no delay.
      • enableIsWriteStopped

        public void enableIsWriteStopped()
        Returns 1 if write has been stopped.
      • enableBlockCacheCapacity

        public void enableBlockCacheCapacity()
        Returns block cache capacity.
      • enableBlockCacheUsage

        public void enableBlockCacheUsage()
        Returns the memory size for the entries residing in block cache.
      • enableBlockCachePinnedUsage

        public void enableBlockCachePinnedUsage()
        Returns the memory size for the entries being pinned in block cache.
      • enableNumFilesAtLevel

        public void enableNumFilesAtLevel()
        Returns the number of files per level.
      • setColumnFamilyAsVariable

        public void setColumnFamilyAsVariable​(boolean columnFamilyAsVariable)
        Returns the column family as variable.
      • getMonitorTickerTypes

        public Collection<org.rocksdb.TickerType> getMonitorTickerTypes()
        Returns:
        the enabled RocksDB statistics metrics.
      • isEnabled

        public boolean isEnabled()
        {RocksDBNativeMetricMonitor} is enabled if any property or ticker type is set.
        Returns:
        true if {{RocksDBNativeMetricMonitor}} should be enabled, false otherwise.
      • isStatisticsEnabled

        public boolean isStatisticsEnabled()
        Returns:
        true if RocksDB statistics metrics are enabled, false otherwise.
      • isColumnFamilyAsVariable

        public boolean isColumnFamilyAsVariable()
        {RocksDBNativeMetricMonitor} Whether to expose the column family as a variable..
        Returns:
        true is column family to expose variable, false otherwise.