L
- the type of the length of the window (e.g Count, Duration)public class TumblingWindows<L> extends BaseWindow<L,L>
lag, lateTupleStream, timestampField
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
L |
getSlidingInterval()
The sliding interval of the window.
|
L |
getWindowLength()
The length of the window.
|
int |
hashCode() |
static TumblingWindows<BaseWindowedBolt.Count> |
of(BaseWindowedBolt.Count count)
A count based tumbling window.
|
static TumblingWindows<BaseWindowedBolt.Duration> |
of(BaseWindowedBolt.Duration duration)
A time duration based tumbling window.
|
TumblingWindows<L> |
withLag(BaseWindowedBolt.Duration duration)
Specify the maximum time lag of the tuple timestamp in milliseconds.
|
TumblingWindows<L> |
withLateTupleStream(String streamId)
Specify a stream id on which late tuples are going to be emitted.
|
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.
|
getLag, getLateTupleStream, getTimestampField
public static TumblingWindows<BaseWindowedBolt.Count> of(BaseWindowedBolt.Count count)
count
- the number of tuples after which the window tumblespublic static TumblingWindows<BaseWindowedBolt.Duration> of(BaseWindowedBolt.Duration duration)
duration
- the time duration after which the window tumblespublic L getWindowLength()
Window
public L getSlidingInterval()
Window
public TumblingWindows<L> withTimestampField(String fieldName)
IllegalArgumentException
will
be thrown.fieldName
- the name of the field that contains the timestamppublic TumblingWindows<L> withLateTupleStream(String streamId)
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 onpublic TumblingWindows<L> withLag(BaseWindowedBolt.Duration duration)
duration
- the max lag durationpublic boolean equals(Object o)
equals
in class BaseWindow<L,L>
public int hashCode()
hashCode
in class BaseWindow<L,L>
Copyright © 2023 The Apache Software Foundation. All rights reserved.