public static class StreamSQLTestProgram.KillMapper extends Object implements MapFunction<Row,Row>, ListCheckpointed<Integer>, ResultTypeQueryable
Constructor and Description |
---|
KillMapper() |
Modifier and Type | Method and Description |
---|---|
TypeInformation |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
Row |
map(Row value)
The mapping method.
|
void |
restoreState(List<Integer> state)
Restores the state of the function or operator to that of a previous checkpoint.
|
List<Integer> |
snapshotState(long checkpointId,
long timestamp)
Gets the current state of the function.
|
public Row map(Row value)
MapFunction
map
in interface MapFunction<Row,Row>
value
- The input value.public TypeInformation getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable
public List<Integer> snapshotState(long checkpointId, long timestamp)
ListCheckpointed
The returned list should contain one entry for redistributable unit of state. See
the class docs
for an illustration how list-style state
redistribution works.
As special case, the returned list may be null or empty (if the operator has no state) or it may contain a single element (if the operator state is indivisible).
snapshotState
in interface ListCheckpointed<Integer>
checkpointId
- The ID of the checkpoint - a unique and monotonously increasing value.timestamp
- The wall clock timestamp when the checkpoint was triggered by the master.public void restoreState(List<Integer> state)
ListCheckpointed
The given state list will contain all the sub states that this parallel
instance of the function needs to handle. Refer to the class docs
for an illustration how list-style state redistribution works.
Important: When implementing this interface together with RichFunction
,
then the restoreState()
method is called before RichFunction.open(Configuration)
.
restoreState
in interface ListCheckpointed<Integer>
state
- The state to be restored as a list of atomic sub-states.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.