Class HRegion.FlushResultImpl
java.lang.Object
org.apache.hadoop.hbase.regionserver.HRegion.FlushResultImpl
- All Implemented Interfaces:
- HRegion.FlushResult
- Enclosing class:
- HRegion
Objects from this class are created when flushing to describe all the different states that
 that method ends up in. The Result enum describes those states. The sequence id should only be
 specified if the flush was successful, and the failure message should only be specified if it
 didn't flush.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.hadoop.hbase.regionserver.HRegion.FlushResultHRegion.FlushResult.Result
- 
Field SummaryFieldsModifier and TypeFieldDescription(package private) final String(package private) final long(package private) final HRegion.FlushResult.Result(package private) final boolean
- 
Constructor SummaryConstructorsConstructorDescriptionFlushResultImpl(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.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the detailed result codebooleanConvenience method, the equivalent of checking if result is FLUSHED_COMPACTION_NEEDED.booleanConvenience method, the equivalent of checking if result is FLUSHED_NO_COMPACTION_NEEDED or FLUSHED_NO_COMPACTION_NEEDED.toString()
- 
Field Details- 
result
- 
failureReason
- 
flushSequenceId
- 
wroteFlushWalMarker
 
- 
- 
Constructor Details- 
FlushResultImplFlushResultImpl(HRegion.FlushResult.Result result, long flushSequenceId) Convenience constructor to use when the flush is successful, the failure message is set to null.- Parameters:
- result- Expecting FLUSHED_NO_COMPACTION_NEEDED or FLUSHED_COMPACTION_NEEDED.
- flushSequenceId- Generated sequence id that comes right after the edits in the memstores.
 
- 
FlushResultImplFlushResultImpl(HRegion.FlushResult.Result result, String failureReason, boolean wroteFlushMarker) Convenience constructor to use when we cannot flush.- Parameters:
- result- Expecting CANNOT_FLUSH_MEMSTORE_EMPTY or CANNOT_FLUSH.
- failureReason- Reason why we couldn't flush.
 
- 
FlushResultImplFlushResultImpl(HRegion.FlushResult.Result result, long flushSequenceId, String failureReason, boolean wroteFlushMarker) Constructor with all the parameters.- Parameters:
- 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.
 
 
- 
- 
Method Details- 
isFlushSucceededConvenience method, the equivalent of checking if result is FLUSHED_NO_COMPACTION_NEEDED or FLUSHED_NO_COMPACTION_NEEDED.- Specified by:
- isFlushSucceededin interface- HRegion.FlushResult
- Returns:
- true if the memstores were flushed, else false.
 
- 
isCompactionNeededConvenience method, the equivalent of checking if result is FLUSHED_COMPACTION_NEEDED.- Specified by:
- isCompactionNeededin interface- HRegion.FlushResult
- Returns:
- True if the flush requested a compaction, else false (doesn't even mean it flushed).
 
- 
toString
- 
getResultDescription copied from interface:HRegion.FlushResultReturns the detailed result code- Specified by:
- getResultin interface- HRegion.FlushResult
 
 
-