Package org.apache.hadoop.hbase.wal
Enum Class WALTailingReader.State
- All Implemented Interfaces:
Serializable
,Comparable<WALTailingReader.State>
,Constable
- Enclosing interface:
- WALTailingReader
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThis means we reach the EOF and the upper layer need to reset to see if there is more data.Mostly the same with the aboveEOF_AND_RESET
, the difference is that here we also mess up the compression dictionary when reading data, so the upper layer should also clear the compression context when reseting, which means when calling resetTo method, we need to skip to the position instead of just seek to, which will impact performance.This means the WAL file has a trailer and we have reached it, which means we have finished reading this file normallyThis means we meet an error so the upper layer need to reset to read againMostly the same with the aboveERROR_AND_RESET
, the difference is that here we also mess up the compression dictionary when reading data, so the upper layer should also clear the compression context when reseting, which means when calling resetTo method, we need to skip to the position instead of just seek to, which will impact performance.This means we read an Entry without any error -
Field Summary
Modifier and TypeFieldDescriptionprivate WALTailingReader.Result
A dummy result for returning, as exceptNORMAL
, for other state we do not need to provide fields other than state in the returnedWALTailingReader.Result
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
eof()
boolean
static WALTailingReader.State
Returns the enum constant of this class with the specified name.static WALTailingReader.State[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NORMAL
This means we read an Entry without any error -
EOF_WITH_TRAILER
This means the WAL file has a trailer and we have reached it, which means we have finished reading this file normally -
ERROR_AND_RESET
This means we meet an error so the upper layer need to reset to read again -
ERROR_AND_RESET_COMPRESSION
Mostly the same with the aboveERROR_AND_RESET
, the difference is that here we also mess up the compression dictionary when reading data, so the upper layer should also clear the compression context when reseting, which means when calling resetTo method, we need to skip to the position instead of just seek to, which will impact performance. -
EOF_AND_RESET
This means we reach the EOF and the upper layer need to reset to see if there is more data. Notice that this does not mean that there is necessarily more data, the upper layer should determine whether they need to reset and read again. -
EOF_AND_RESET_COMPRESSION
Mostly the same with the aboveEOF_AND_RESET
, the difference is that here we also mess up the compression dictionary when reading data, so the upper layer should also clear the compression context when reseting, which means when calling resetTo method, we need to skip to the position instead of just seek to, which will impact performance. The implementation should try its best to not fall into this situation.
-
-
Field Details
-
result
A dummy result for returning, as exceptNORMAL
, for other state we do not need to provide fields other than state in the returnedWALTailingReader.Result
.
-
-
Constructor Details
-
State
private State()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getResult
-
resetCompression
-
eof
-