Class SliceAssigners


  • @Internal
    public final class SliceAssigners
    extends Object
    Utilities to create SliceAssigners.
    • Method Detail

      • tumbling

        public static SliceAssigners.TumblingSliceAssigner tumbling​(int rowtimeIndex,
                                                                    java.time.ZoneId shiftTimeZone,
                                                                    java.time.Duration size)
        Creates a tumbling window SliceAssigner that assigns elements to slices of tumbling windows.
        Parameters:
        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.
        size - the size of the generated windows.
      • hopping

        public static SliceAssigners.HoppingSliceAssigner hopping​(int rowtimeIndex,
                                                                  java.time.ZoneId shiftTimeZone,
                                                                  java.time.Duration size,
                                                                  java.time.Duration slide)
        Creates a hopping window SliceAssigner that assigns elements to slices of hopping windows.
        Parameters:
        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.
        slide - the slide interval of the generated windows.
      • cumulative

        public static SliceAssigners.CumulativeSliceAssigner cumulative​(int rowtimeIndex,
                                                                        java.time.ZoneId shiftTimeZone,
                                                                        java.time.Duration maxSize,
                                                                        java.time.Duration step)
        Creates a cumulative window SliceAssigner that assigns elements to slices of cumulative windows.
        Parameters:
        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.
        step - the step interval of the generated windows.
      • windowed

        public static SliceAssigners.WindowedSliceAssigner windowed​(int windowEndIndex,
                                                                    SliceAssigner innerAssigner)
        Creates a SliceAssigner that assigns elements which has been attached window start and window end timestamp to slices. The assigned slice is equal to the given window.
        Parameters:
        windowEndIndex - the index of window end field in the input row, mustn't be a negative value.
        innerAssigner - the inner assigner which assigns the attached windows
      • sliced

        public static SliceAssigner sliced​(int sliceEndIndex,
                                           SliceAssigner innerAssigner)
        Creates a SliceAssigner that assigns elements which has been attached slice end timestamp.
        Parameters:
        sliceEndIndex - the index of slice end field in the input row, mustn't be a negative value.
        innerAssigner - the inner assigner which assigns the attached windows