@Internal public class SavepointOutputFormat extends RichOutputFormat<CheckpointMetadata>
CheckpointMetadata
metadata to distributed storage.
This format may only be executed with parallelism 1.
Constructor and Description |
---|
SavepointOutputFormat(Path savepointPath) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Method that marks the end of the life-cycle of parallel output instance.
|
void |
configure(Configuration parameters)
Configures this output format.
|
void |
open(int taskNumber,
int numTasks)
Opens a parallel instance of the output format to store the result of its parallel instance.
|
void |
writeRecord(CheckpointMetadata metadata)
Adds a record to the output.
|
getRuntimeContext, setRuntimeContext
public SavepointOutputFormat(Path savepointPath)
public void configure(Configuration parameters)
OutputFormat
This method is always called first on a newly instantiated output format.
parameters
- The configuration with all parameters.public void open(int taskNumber, int numTasks) throws IOException
OutputFormat
When this method is called, the output format it guaranteed to be configured.
taskNumber
- The number of the parallel instance.numTasks
- The number of parallel tasks.IOException
- Thrown, if the output could not be opened due to an I/O problem.public void writeRecord(CheckpointMetadata metadata) throws IOException
OutputFormat
When this method is called, the output format it guaranteed to be opened.
metadata
- The records to add to the output.IOException
- Thrown, if the records could not be added to to an I/O problem.public void close()
OutputFormat
When this method is called, the output format it guaranteed to be opened.
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.