Learning Apache Apex
by Ananth Gundabattula, Thomas Weise, Munagala V. Ramanath, David Yan, Kenneth Knowles
Merging of streams
The WindowedOperator provides a way to merge two data streams for state accumulation by way of a WindowedMergeOperator. This operator has two incoming data streams and takes a MergeAccumulation instead of a regular Accumulation. The user of this operator can implement the MergeAccumulation interface to provide their custom merge or join accumulation based on their business logic. InnerJoin and Cogroup are examples of such accumulation in the Apex Library.
The WindowedMergeOperator generates its own watermarks based on the watermarks of the two input streams. The generated watermark timestamp is the earlier watermark timestamp between the two input streams. When that value changes upon the arrival of incoming watermarks, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access