public static enum SegmentWithState.SegmentState extends Enum<SegmentWithState.SegmentState>
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 and Description |
---|
APPEND_FINISHED |
APPENDING |
PUSHED_AND_DROPPED |
Modifier and Type | Method and Description |
---|---|
static SegmentWithState.SegmentState |
fromString(String name) |
static SegmentWithState.SegmentState |
valueOf(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.
|
public static final SegmentWithState.SegmentState APPENDING
public static final SegmentWithState.SegmentState APPEND_FINISHED
public static final SegmentWithState.SegmentState PUSHED_AND_DROPPED
public static SegmentWithState.SegmentState[] values()
for (SegmentWithState.SegmentState c : SegmentWithState.SegmentState.values()) System.out.println(c);
public static SegmentWithState.SegmentState valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static SegmentWithState.SegmentState fromString(String name)
Copyright © 2011–2018. All rights reserved.