public static class HRegion.FlushResultImpl extends Object implements HRegion.FlushResult
HRegion.FlushResult.Result
Modifier and Type | Field and Description |
---|---|
(package private) String |
failureReason |
(package private) long |
flushSequenceId |
(package private) HRegion.FlushResult.Result |
result |
(package private) boolean |
wroteFlushWalMarker |
Constructor and Description |
---|
FlushResultImpl(HRegion.FlushResult.Result result,
long flushSequenceId)
Convenience constructor to use when the flush is successful, the failure message is set to
null.
|
FlushResultImpl(HRegion.FlushResult.Result result,
long flushSequenceId,
String failureReason,
boolean wroteFlushMarker)
Constructor with all the parameters.
|
FlushResultImpl(HRegion.FlushResult.Result result,
String failureReason,
boolean wroteFlushMarker)
Convenience constructor to use when we cannot flush.
|
Modifier and Type | Method and Description |
---|---|
HRegion.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 HRegion.FlushResult.Result result
final String failureReason
final long flushSequenceId
final boolean wroteFlushWalMarker
FlushResultImpl(HRegion.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.FlushResultImpl(HRegion.FlushResult.Result result, String failureReason, boolean wroteFlushMarker)
result
- Expecting CANNOT_FLUSH_MEMSTORE_EMPTY or CANNOT_FLUSH.failureReason
- Reason why we couldn't flush.FlushResultImpl(HRegion.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 HRegion.FlushResult
public boolean isCompactionNeeded()
isCompactionNeeded
in interface HRegion.FlushResult
public HRegion.FlushResult.Result getResult()
getResult
in interface HRegion.FlushResult
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.