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
public static enum SegmentWithState.SegmentState extends Enum<SegmentWithState.SegmentState>
Segment state transition is different inBatchAppenderatorDriverandStreamAppenderatorDriver. When a new segment is created, its state isAPPENDING. - In stream ingestion, the state of some segments can be changed to theAPPEND_FINISHEDstate. Data is not appended to these segments anymore, and they are waiting for beging published. SeeStreamAppenderatorDriver.moveSegmentOut(String, List). - In batch ingestion, the state of some segments can be changed to thePUSHED_AND_DROPPEDstate. These segments are pushed and dropped from the local storage, but not published yet. SeeBatchAppenderatorDriver.pushAndClear(Collection, long). Note: If you need to add more states which are used differently in batch and streaming ingestion, consider moving SegmentState toBatchAppenderatorDriverandStreamAppenderatorDriver.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPEND_FINISHEDAPPENDINGPUSHED_AND_DROPPED
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SegmentWithState.SegmentStatefromString(String name)static SegmentWithState.SegmentStatevalueOf(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 Detail
-
APPENDING
public static final SegmentWithState.SegmentState APPENDING
-
APPEND_FINISHED
public static final SegmentWithState.SegmentState APPEND_FINISHED
-
PUSHED_AND_DROPPED
public static final SegmentWithState.SegmentState PUSHED_AND_DROPPED
-
-
Method Detail
-
values
public static SegmentWithState.SegmentState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SegmentWithState.SegmentState c : SegmentWithState.SegmentState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SegmentWithState.SegmentState valueOf(String name)
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
public static SegmentWithState.SegmentState fromString(String name)
-
-