T
- The type of the consumed records.@Internal public class FileSystemOutputFormat<T> extends Object implements OutputFormat<T>, FinalizeOnMaster, Serializable, SupportsConcurrentExecutionAttempts
OutputFormat
for batch job. It commits in FinalizeOnMaster.finalizeGlobal(FinalizationContext)
.Modifier and Type | Class and Description |
---|---|
static class |
FileSystemOutputFormat.Builder<T>
Builder to build
FileSystemOutputFormat . |
OutputFormat.InitializationContext
FinalizeOnMaster.FinalizationContext
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 |
finalizeGlobal(FinalizeOnMaster.FinalizationContext context)
The method is invoked on the master (JobManager) after all (parallel) instances of an
OutputFormat finished.
|
void |
open(OutputFormat.InitializationContext context)
Opens a parallel instance of the output format to store the result of its parallel instance.
|
void |
writeRecord(T record)
Adds a record to the output.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
open
finalizeGlobal
public void finalizeGlobal(FinalizeOnMaster.FinalizationContext context)
FinalizeOnMaster
finalizeGlobal
in interface FinalizeOnMaster
context
- The context to get finalization infos.public void configure(Configuration parameters)
OutputFormat
This method is always called first on a newly instantiated output format.
configure
in interface OutputFormat<T>
parameters
- The configuration with all parameters.public void open(OutputFormat.InitializationContext context) throws IOException
OutputFormat
When this method is called, the output format it guaranteed to be configured.
open
in interface OutputFormat<T>
context
- The context to get task parallel infos.IOException
- Thrown, if the output could not be opened due to an I/O problem.public void writeRecord(T record)
OutputFormat
When this method is called, the output format it guaranteed to be opened.
writeRecord
in interface OutputFormat<T>
record
- The records to add to the output.public void close() throws IOException
OutputFormat
When this method is called, the output format it guaranteed to be opened.
close
in interface OutputFormat<T>
IOException
- Thrown, if the input could not be closed properly.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.