Enum SegmentWithState.SegmentState
java.lang.Object
java.lang.Enum<SegmentWithState.SegmentState>
org.apache.druid.segment.realtime.appenderator.SegmentWithState.SegmentState
- All Implemented Interfaces:
Serializable,Comparable<SegmentWithState.SegmentState>
- Enclosing class:
- SegmentWithState
Segment state transition is different in
BatchAppenderatorDriver and StreamAppenderatorDriver.
When a new segment is created, its state is APPENDING.
- In stream ingestion, the state of some segments can be changed to the APPEND_FINISHED state. Data is
not appended to these segments anymore, and they are waiting for beging published.
See StreamAppenderatorDriver.moveSegmentOut(String, List).
- In batch ingestion, the state of some segments can be changed to the PUSHED_AND_DROPPED state. These
segments are pushed and dropped from the local storage, but not published yet.
See BatchAppenderatorDriver.pushAndClear(Collection, long).
Note: If you need to add more states which are used differently in batch and streaming ingestion, consider moving
SegmentState to BatchAppenderatorDriver and StreamAppenderatorDriver.-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionfromString(String name) Returns the enum constant of this type with the specified name.static SegmentWithState.SegmentState[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
APPENDING
-
APPEND_FINISHED
-
PUSHED_AND_DROPPED
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
fromString
-