Enum Class ProcessingGuarantee
- All Implemented Interfaces:
Serializable
,Comparable<ProcessingGuarantee>
,Constable
When AT_LEAST_ONCE
or EXACTLY_ONCE
is set, distributed
snapshotting will be enabled for the job. The distributed snapshot algorithm
works by sending barriers down the stream which upon receiving causes
the processors to save their state as a snapshot. Snapshots are saved
in memory and replicated across the cluster.
Since a processor can have multiple inputs, it must wait until the barrier is
received from all inputs before taking a snapshot. The difference between
AT_LEAST_ONCE
and EXACTLY_ONCE
is that in
AT_LEAST_ONCE
mode the processor can continue to process items
from inputs which have already received the barrier. This will result
in lower latency and higher throughput overall, with the caveat that
some items may be processed twice after a restart.
- Since:
- Jet 3.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionEnables at-least-once processing semantics.Enables exactly-once processing semantics.No processing guarantees are given and no snapshots are taken during job execution. -
Method Summary
Modifier and TypeMethodDescriptionstatic ProcessingGuarantee
Returns the enum constant of this class with the specified name.static ProcessingGuarantee[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No processing guarantees are given and no snapshots are taken during job execution. When a job is restarted automatically it will be as if the job is starting from scratch which can cause items to be lost or duplicated.This option provides the overall best throughput and latency and no storage overheads from snapshotting. However, it doesn't provide any correctness guarantees under failure.
-
AT_LEAST_ONCE
Enables at-least-once processing semantics. When a job is restarted it will be resumed from the latest available snapshot. Items which have been processed before the snapshot might be processed again after the job is resumed.This option requires in-memory snapshotting which will cause additional storage requirements and overhead compared to
NONE
. However it provides better latency thanEXACTLY_ONCE
with weaker guarantees. -
EXACTLY_ONCE
Enables exactly-once processing semantics. When a job is restarted it will be resumed from the latest available snapshot. Items which have been processed before the snapshot are guaranteed not to be processed again after the job is resumed.This option requires in-memory snapshotting which will cause additional storage requirements and overhead compared to
NONE
. It provides the strongest correctness guarantee. However latency might increase due to the aligning of barriers which are required in this processing mode.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-