Class PeriodicImpulse
- All Implemented Interfaces:
Serializable
,HasDisplayData
PTransform
which produces a sequence of elements at fixed runtime intervals.
If applyWindowing() is specified, each element will be assigned to its own fixed window.
See PeriodicSequence
.
- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Method Summary
Modifier and TypeMethodDescriptioncatchUpToNow
(boolean catchUpToNow) For internal use only; no backwards-compatibility guarantees.static PeriodicImpulse
create()
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.Assign a timestamp when the pipeliene starts to produce data.For internal use only; no backwards-compatibility guarantees.Assign a timestamp when the pipeliene stops producing data.withInterval
(Duration interval) Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Method Details
-
create
-
startAt
Assign a timestamp when the pipeliene starts to produce data.Cannot be used along with
stopAfter(org.joda.time.Duration)
. -
stopAt
Assign a timestamp when the pipeliene stops producing data.Cannot be used along with
stopAfter(org.joda.time.Duration)
. -
stopAfter
For internal use only; no backwards-compatibility guarantees.Assign a time interval at which the pipeliene produces data. This is different from setting
startAt(org.joda.time.Instant)
andstopAt(org.joda.time.Instant)
, as the first timestamp is determined at run time (pipeline starts processing). -
withInterval
-
applyWindowing
-
catchUpToNow
For internal use only; no backwards-compatibility guarantees.The default behavior is that PeriodicImpulse emits all instants until Instant.now(), then starts firing at the specified interval. If this is set to false, the PeriodicImpulse will perform the interval wait before firing each instant.
-
expand
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
method.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expand
in classPTransform<PBegin,
PCollection<Instant>>
-