S- The type of input split.
T- The type of the channel state to be checkpointed / included in the snapshot.
@PublicEvolving public interface CheckpointableInputFormat<S extends InputSplit,T extends Serializable>
InputFormats that allow checkpointing/restoring their state.
|Modifier and Type||Method and Description|
Returns the split currently being read, along with its current state.
Restores the state of a parallel instance reading from an
T getCurrentState() throws IOException
IOException- Thrown if the creation of the state object failed.
void reopen(S split, T state) throws IOException
InputFormat. This is necessary when recovering from a task failure. When this method is called, the input format it guaranteed to be configured.
NOTE: The caller has to make sure that the provided split is the one to whom the state belongs.
split- The split to be opened.
state- The state from which to start from. This can contain the offset, but also other data, depending on the input format.
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.