Class MergeRateLimiter

    • Field Detail

      • MIN_PAUSE_NS

        private static final long MIN_PAUSE_NS
      • MAX_PAUSE_NS

        private static final long MAX_PAUSE_NS
      • mbPerSec

        private volatile double mbPerSec
      • minPauseCheckBytes

        private volatile long minPauseCheckBytes
      • lastNS

        private java.util.concurrent.atomic.AtomicLong lastNS
      • totalBytesWritten

        private java.util.concurrent.atomic.AtomicLong totalBytesWritten
    • Method Detail

      • setMBPerSec

        public void setMBPerSec​(double mbPerSec)
        Description copied from class: RateLimiter
        Sets an updated MB per second rate limit. A subclass is allowed to perform dynamic updates of the rate limit during use.
        Specified by:
        setMBPerSec in class RateLimiter
      • getMBPerSec

        public double getMBPerSec()
        Description copied from class: RateLimiter
        The current MB per second rate limit.
        Specified by:
        getMBPerSec in class RateLimiter
      • getTotalBytesWritten

        public long getTotalBytesWritten()
        Returns total bytes written by this merge.
      • getTotalStoppedNS

        public long getTotalStoppedNS()
        Total NS merge was stopped.
      • getTotalPausedNS

        public long getTotalPausedNS()
        Total NS merge was paused to rate limit IO.
      • getMinPauseCheckBytes

        public long getMinPauseCheckBytes()
        Description copied from class: RateLimiter
        How many bytes caller should add up itself before invoking RateLimiter.pause(long). NOTE: The value returned by this method may change over time and is not guaranteed to be constant throughout the lifetime of the RateLimiter. Users are advised to refresh their local values with calls to this method to ensure consistency.
        Specified by:
        getMinPauseCheckBytes in class RateLimiter