public static class HRegion.FlushResultImpl extends Object implements Region.FlushResult
Region.FlushResult.Result| Modifier and Type | Field and Description |
|---|---|
(package private) String |
failureReason |
(package private) long |
flushSequenceId |
(package private) Region.FlushResult.Result |
result |
(package private) boolean |
wroteFlushWalMarker |
| Constructor and Description |
|---|
HRegion.FlushResultImpl(Region.FlushResult.Result result,
long flushSequenceId)
Convenience constructor to use when the flush is successful, the failure message is set to
null.
|
HRegion.FlushResultImpl(Region.FlushResult.Result result,
long flushSequenceId,
String failureReason,
boolean wroteFlushMarker)
Constructor with all the parameters.
|
HRegion.FlushResultImpl(Region.FlushResult.Result result,
String failureReason,
boolean wroteFlushMarker)
Convenience constructor to use when we cannot flush.
|
| Modifier and Type | Method and Description |
|---|---|
Region.FlushResult.Result |
getResult() |
boolean |
isCompactionNeeded()
Convenience method, the equivalent of checking if result is FLUSHED_COMPACTION_NEEDED.
|
boolean |
isFlushSucceeded()
Convenience method, the equivalent of checking if result is
FLUSHED_NO_COMPACTION_NEEDED or FLUSHED_NO_COMPACTION_NEEDED.
|
String |
toString() |
final Region.FlushResult.Result result
final String failureReason
final long flushSequenceId
final boolean wroteFlushWalMarker
HRegion.FlushResultImpl(Region.FlushResult.Result result, long flushSequenceId)
result - Expecting FLUSHED_NO_COMPACTION_NEEDED or FLUSHED_COMPACTION_NEEDED.flushSequenceId - Generated sequence id that comes right after the edits in the
memstores.HRegion.FlushResultImpl(Region.FlushResult.Result result, String failureReason, boolean wroteFlushMarker)
result - Expecting CANNOT_FLUSH_MEMSTORE_EMPTY or CANNOT_FLUSH.failureReason - Reason why we couldn't flush.HRegion.FlushResultImpl(Region.FlushResult.Result result, long flushSequenceId, String failureReason, boolean wroteFlushMarker)
result - Any of the Result.flushSequenceId - Generated sequence id if the memstores were flushed else -1.failureReason - Reason why we couldn't flush, or null.public boolean isFlushSucceeded()
isFlushSucceeded in interface Region.FlushResultpublic boolean isCompactionNeeded()
isCompactionNeeded in interface Region.FlushResultpublic Region.FlushResult.Result getResult()
getResult in interface Region.FlushResultCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.