@Internal public class UnsliceAssigners extends Object
UnsliceAssigner
s.Modifier and Type | Class and Description |
---|---|
static class |
UnsliceAssigners.SessionUnsliceAssigner
The
UnsliceAssigner for session windows. |
static class |
UnsliceAssigners.WindowedUnsliceAssigner
The
UnsliceAssigner for elements have been merged into unslicing windows and attached
window start and end timestamps. |
Constructor and Description |
---|
UnsliceAssigners() |
Modifier and Type | Method and Description |
---|---|
static UnsliceAssigners.SessionUnsliceAssigner |
session(int rowtimeIndex,
java.time.ZoneId shiftTimeZone,
java.time.Duration gap)
Creates a session window
UnsliceAssigner that assigns elements to windows based on
the timestamp. |
static UnsliceAssigners.WindowedUnsliceAssigner |
windowed(int windowStartIndex,
int windowEndIndex,
UnsliceAssigner<TimeWindow> innerAssigner)
Creates a
UnsliceAssigner that assigns elements which has been attached window start
and window end timestamp to windows. |
public static UnsliceAssigners.SessionUnsliceAssigner session(int rowtimeIndex, java.time.ZoneId shiftTimeZone, java.time.Duration gap)
UnsliceAssigner
that assigns elements to windows based on
the timestamp.rowtimeIndex
- The index of rowtime field in the input row, -1
if based on
processing time.shiftTimeZone
- The shift timezone of the window, if the proctime or rowtime type is
TIMESTAMP_LTZ, the shift timezone is the timezone user configured in TableConfig, other
cases the timezone is UTC which means never shift when assigning windows.gap
- The session timeout, i.e. the time gap between sessionspublic static UnsliceAssigners.WindowedUnsliceAssigner windowed(int windowStartIndex, int windowEndIndex, UnsliceAssigner<TimeWindow> innerAssigner)
UnsliceAssigner
that assigns elements which has been attached window start
and window end timestamp to windows. The assigned windows doesn't need to be merged again.windowStartIndex
- the index of window start field in the input row, mustn't be a
negative value.windowEndIndex
- the index of window end field in the input row, mustn't be a negative
value.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.