public class FailureMapper<T> extends RichMapFunction<T,T> implements CheckpointListener
The total times to simulate a failure across multiple execution attempts of the operator can also be configured. Note that this also takes into account failures that were not triggered by this mapper, e.g. TaskManager failures.
Constructor and Description |
---|
FailureMapper(long numProcessedRecordsFailureThreshold,
long numCompleteCheckpointsFailureThreshold,
int maxNumFailures) |
Modifier and Type | Method and Description |
---|---|
T |
map(T value)
The mapping method.
|
void |
notifyCheckpointComplete(long checkpointId)
This method is called as a notification once a distributed checkpoint has been completed.
|
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
public FailureMapper(long numProcessedRecordsFailureThreshold, long numCompleteCheckpointsFailureThreshold, int maxNumFailures)
public T map(T value) throws Exception
MapFunction
map
in interface MapFunction<T,T>
map
in class RichMapFunction<T,T>
value
- The input value.Exception
- This method may throw exceptions. Throwing an exception will cause the operation
to fail and may trigger recovery.public void notifyCheckpointComplete(long checkpointId) throws Exception
CheckpointListener
notifyCheckpointComplete
in interface CheckpointListener
checkpointId
- The ID of the checkpoint that has been completed.Exception
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.