public class FaultTolerance extends Object
IMap
to perform rolling average calculations and
illustrates the differences in processing guarantees.
A price updater thread keeps updating the current price of each stock
and writes the new value, along with a timestamp into a distributed
IMap
.
A price analyzer DAG consumes events from this map, and performs a rolling average calculation per ticker using the given window sizes. The output is written to stdout via the logger sink.
Initially, there are two nodes in the cluster. After a given delay one
of the nodes will be shut down and the job automatically restarted.
The output after restart should be observed to see what happens when
different kinds of ProcessingGuarantee
s are given.
Constructor and Description |
---|
FaultTolerance() |
Copyright © 2020 Hazelcast, Inc.. All rights reserved.