public class MergeRateLimiter extends RateLimiter
RateLimiter that IndexWriter assigns to each running merge, to
give MergeSchedulers 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)
RateLimitersetMBPerSec in class RateLimiterpublic double getMBPerSec()
RateLimitergetMBPerSec in class RateLimiterpublic long getTotalBytesWritten()
public long pause(long bytes)
throws MergePolicy.MergeAbortedException
RateLimiterNote: the implementation is thread-safe
pause in class RateLimiterMergePolicy.MergeAbortedExceptionpublic long getTotalStoppedNS()
public long getTotalPausedNS()
public long getMinPauseCheckBytes()
RateLimiterRateLimiter.pause(long).getMinPauseCheckBytes in class RateLimiterCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.