Class TumblingWindows<L>

Type Parameters:
L - the type of the length of the window (e.g Count, Duration)
All Implemented Interfaces:
Serializable, Window<L,L>

public class TumblingWindows<L> extends BaseWindow<L,L>
A tumbling window specification. The window tumbles after the specified window length.
See Also:
  • Method Details

    • of

      A count based tumbling window.
      count - the number of tuples after which the window tumbles
    • of

      A time duration based tumbling window.
      duration - the time duration after which the window tumbles
    • getWindowLength

      public L getWindowLength()
      Description copied from interface: Window
      The length of the window.
      the window length
    • getSlidingInterval

      public L getSlidingInterval()
      Description copied from interface: Window
      The sliding interval of the window.
      the sliding interval
    • withTimestampField

      public TumblingWindows<L> withTimestampField(String fieldName)
      The name of the field in the tuple that contains the timestamp when the event occurred as a long value. This is used of event-time based processing. If this config is set and the field is not present in the incoming tuple, an IllegalArgumentException will be thrown.
      fieldName - the name of the field that contains the timestamp
    • withLateTupleStream

      public TumblingWindows<L> withLateTupleStream(String streamId)
      Specify a stream id on which late tuples are going to be emitted. They are going to be accessible via the WindowedBoltExecutor.LATE_TUPLE_FIELD field. It must be defined on a per-component basis, and in conjunction with the BaseWindowedBolt.withTimestampField(java.lang.String), otherwise IllegalArgumentException will be thrown.
      streamId - the name of the stream used to emit late tuples on
    • withLag

      public TumblingWindows<L> withLag(BaseWindowedBolt.Duration duration)
      Specify the maximum time lag of the tuple timestamp in milliseconds. It means that the tuple timestamps cannot be out of order by more than this amount.
      duration - the max lag duration
    • equals

      public boolean equals(Object o)
      equals in class BaseWindow<L,L>
    • hashCode

      public int hashCode()
      hashCode in class BaseWindow<L,L>