public abstract class BaseStatefulWindowedBolt<T extends State> extends BaseWindowedBolt implements IStatefulWindowedBolt<T>
BaseWindowedBolt.Count, BaseWindowedBolt.DurationtimestampExtractor, windowConfiguration| Constructor and Description |
|---|
BaseStatefulWindowedBolt() |
| Modifier and Type | Method and Description |
|---|---|
void |
preCommit(long txid)
This is a hook for the component to perform some actions just before the framework commits its state.
|
void |
prePrepare(long txid)
This is a hook for the component to perform some actions just before the framework prepares its state.
|
void |
preRollback()
This is a hook for the component to perform some actions just before the framework rolls back the prepared state.
|
BaseStatefulWindowedBolt<T> |
withLag(BaseWindowedBolt.Duration duration)
Specify the maximum time lag of the tuple timestamp in milliseconds.
|
BaseStatefulWindowedBolt<T> |
withLateTupleStream(String streamName)
Specify a stream id on which late tuples are going to be emitted.
|
BaseStatefulWindowedBolt<T> |
withMessageIdField(String fieldName)
Specify the name of the field in the tuple that holds the message id.
|
BaseStatefulWindowedBolt<T> |
withTimestampExtractor(TimestampExtractor timestampExtractor)
Specify the timestamp extractor implementation.
|
BaseStatefulWindowedBolt<T> |
withTimestampField(String fieldName)
Specify a field in the tuple that represents the timestamp as a long value.
|
BaseStatefulWindowedBolt<T> |
withTumblingWindow(BaseWindowedBolt.Count count)
A count based tumbling window.
|
BaseStatefulWindowedBolt<T> |
withTumblingWindow(BaseWindowedBolt.Duration duration)
A time duration based tumbling window.
|
BaseStatefulWindowedBolt<T> |
withWatermarkInterval(BaseWindowedBolt.Duration interval)
Specify the watermark event generation interval.
|
BaseStatefulWindowedBolt<T> |
withWindow(BaseWindowedBolt.Count windowLength)
A tuple count based window that slides with every incoming tuple.
|
BaseStatefulWindowedBolt<T> |
withWindow(BaseWindowedBolt.Count windowLength,
BaseWindowedBolt.Count slidingInterval)
Tuple count based sliding window configuration.
|
BaseStatefulWindowedBolt<T> |
withWindow(BaseWindowedBolt.Count windowLength,
BaseWindowedBolt.Duration slidingInterval)
Tuple count and time duration based sliding window configuration.
|
BaseStatefulWindowedBolt<T> |
withWindow(BaseWindowedBolt.Duration windowLength)
A time duration based window that slides with every incoming tuple.
|
BaseStatefulWindowedBolt<T> |
withWindow(BaseWindowedBolt.Duration windowLength,
BaseWindowedBolt.Count slidingInterval)
Time duration and count based sliding window configuration.
|
BaseStatefulWindowedBolt<T> |
withWindow(BaseWindowedBolt.Duration windowLength,
BaseWindowedBolt.Duration slidingInterval)
Time duration based sliding window configuration.
|
cleanup, declareOutputFields, getComponentConfiguration, getTimestampExtractor, prepareclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitStatecleanup, execute, getTimestampExtractor, preparedeclareOutputFields, getComponentConfigurationpublic BaseStatefulWindowedBolt<T> withWindow(BaseWindowedBolt.Count windowLength, BaseWindowedBolt.Count slidingInterval)
Tuple count based sliding window configuration.
withWindow in class BaseWindowedBoltwindowLength - the number of tuples in the windowslidingInterval - the number of tuples after which the window slidespublic BaseStatefulWindowedBolt<T> withWindow(BaseWindowedBolt.Count windowLength, BaseWindowedBolt.Duration slidingInterval)
Tuple count and time duration based sliding window configuration.
withWindow in class BaseWindowedBoltwindowLength - the number of tuples in the windowslidingInterval - the time duration after which the window slidespublic BaseStatefulWindowedBolt<T> withWindow(BaseWindowedBolt.Duration windowLength, BaseWindowedBolt.Count slidingInterval)
Time duration and count based sliding window configuration.
withWindow in class BaseWindowedBoltwindowLength - the time duration of the windowslidingInterval - the number of tuples after which the window slidespublic BaseStatefulWindowedBolt<T> withWindow(BaseWindowedBolt.Duration windowLength, BaseWindowedBolt.Duration slidingInterval)
Time duration based sliding window configuration.
withWindow in class BaseWindowedBoltwindowLength - the time duration of the windowslidingInterval - the time duration after which the window slidespublic BaseStatefulWindowedBolt<T> withWindow(BaseWindowedBolt.Count windowLength)
A tuple count based window that slides with every incoming tuple.
withWindow in class BaseWindowedBoltwindowLength - the number of tuples in the windowpublic BaseStatefulWindowedBolt<T> withWindow(BaseWindowedBolt.Duration windowLength)
A time duration based window that slides with every incoming tuple.
withWindow in class BaseWindowedBoltwindowLength - the time duration of the windowpublic BaseStatefulWindowedBolt<T> withTumblingWindow(BaseWindowedBolt.Count count)
A count based tumbling window.
withTumblingWindow in class BaseWindowedBoltcount - the number of tuples after which the window tumblespublic BaseStatefulWindowedBolt<T> withTumblingWindow(BaseWindowedBolt.Duration duration)
A time duration based tumbling window.
withTumblingWindow in class BaseWindowedBoltduration - the time duration after which the window tumblespublic BaseStatefulWindowedBolt<T> withTimestampField(String fieldName)
Specify a field in the tuple that represents the timestamp as a long value. If this field is not present in the incoming tuple, an IllegalArgumentException will be thrown.
withTimestampField in class BaseWindowedBoltfieldName - the name of the field that contains the timestamppublic BaseStatefulWindowedBolt<T> withTimestampExtractor(TimestampExtractor timestampExtractor)
Specify the timestamp extractor implementation.
withTimestampExtractor in class BaseWindowedBolttimestampExtractor - the TimestampExtractor implementationpublic BaseStatefulWindowedBolt<T> withLateTupleStream(String streamName)
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.
withLateTupleStream in class BaseWindowedBoltstreamName - the name of the stream used to emit late tuples onpublic BaseStatefulWindowedBolt<T> 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.
withLag in class BaseWindowedBoltduration - the max lag durationpublic BaseStatefulWindowedBolt<T> withWatermarkInterval(BaseWindowedBolt.Duration interval)
Specify the watermark event generation interval. For tuple based timestamps, watermark events are used to track the progress of time
withWatermarkInterval in class BaseWindowedBoltinterval - the interval at which watermark events are generatedpublic BaseStatefulWindowedBolt<T> withMessageIdField(String fieldName)
Specify the name of the field in the tuple that holds the message id. This is used to track the windowing boundaries and re-evaluating the windowing operation during recovery of IStatefulWindowedBolt
fieldName - the name of the field that contains the message idpublic void preCommit(long txid)
IStatefulComponentThis is a hook for the component to perform some actions just before the framework commits its state.
preCommit in interface IStatefulComponent<T extends State>public void prePrepare(long txid)
IStatefulComponentThis is a hook for the component to perform some actions just before the framework prepares its state.
prePrepare in interface IStatefulComponent<T extends State>public void preRollback()
IStatefulComponentThis is a hook for the component to perform some actions just before the framework rolls back the prepared state.
preRollback in interface IStatefulComponent<T extends State>Copyright © 2019 The Apache Software Foundation. All Rights Reserved.