public class MergeRateLimiter extends RateLimiter
RateLimiter
that IndexWriter
assigns to each running merge, to
give MergeScheduler
s ionice like control.RateLimiter.SimpleRateLimiter
Constructor and Description |
---|
MergeRateLimiter(MergePolicy.OneMergeProgress mergeProgress)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
getMBPerSec()
The current MB per second rate limit.
|
long |
getMinPauseCheckBytes()
How many bytes caller should add up itself before invoking
RateLimiter.pause(long) . |
long |
getTotalBytesWritten()
Returns total bytes written by this merge.
|
long |
getTotalPausedNS()
Total NS merge was paused to rate limit IO.
|
long |
getTotalStoppedNS()
Total NS merge was stopped.
|
long |
pause(long bytes)
Pauses, if necessary, to keep the instantaneous IO
rate at or below the target.
|
void |
setMBPerSec(double mbPerSec)
Sets an updated MB per second rate limit.
|
public MergeRateLimiter(MergePolicy.OneMergeProgress mergeProgress)
public void setMBPerSec(double mbPerSec)
RateLimiter
setMBPerSec
in class RateLimiter
public double getMBPerSec()
RateLimiter
getMBPerSec
in class RateLimiter
public long getTotalBytesWritten()
public long pause(long bytes) throws MergePolicy.MergeAbortedException
RateLimiter
Note: the implementation is thread-safe
pause
in class RateLimiter
MergePolicy.MergeAbortedException
public long getTotalStoppedNS()
public long getTotalPausedNS()
public long getMinPauseCheckBytes()
RateLimiter
RateLimiter.pause(long)
.getMinPauseCheckBytes
in class RateLimiter
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.