Enum WindowStagger
- java.lang.Object
-
- java.lang.Enum<WindowStagger>
-
- org.apache.flink.streaming.api.windowing.assigners.WindowStagger
-
- All Implemented Interfaces:
Serializable
,Comparable<WindowStagger>
@PublicEvolving public enum WindowStagger extends Enum<WindowStagger>
AWindowStagger
staggers offset in runtime for each window assignment.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALIGNED
Default mode, all panes fire at the same time across all partitions.NATURAL
When the first event is received in the window operator, take the difference between the start of the window and current procesing time as the offset.RANDOM
Stagger offset is sampled from uniform distribution U(0, WindowSize) when first event ingested in the partitioned operator.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract long
getStaggerOffset(long currentProcessingTime, long size)
static WindowStagger
valueOf(String name)
Returns the enum constant of this type with the specified name.static WindowStagger[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALIGNED
public static final WindowStagger ALIGNED
Default mode, all panes fire at the same time across all partitions.
-
RANDOM
public static final WindowStagger RANDOM
Stagger offset is sampled from uniform distribution U(0, WindowSize) when first event ingested in the partitioned operator.
-
NATURAL
public static final WindowStagger NATURAL
When the first event is received in the window operator, take the difference between the start of the window and current procesing time as the offset. This way, windows are staggered based on when each parallel operator receives the first event.
-
-
Method Detail
-
values
public static WindowStagger[] 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 (WindowStagger c : WindowStagger.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WindowStagger 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
-
getStaggerOffset
public abstract long getStaggerOffset(long currentProcessingTime, long size)
-
-