Class FileSystemOutputFormat<T>
- java.lang.Object
-
- org.apache.flink.connector.file.table.FileSystemOutputFormat<T>
-
- Type Parameters:
T
- The type of the consumed records.
- All Implemented Interfaces:
Serializable
,FinalizeOnMaster
,OutputFormat<T>
,SupportsConcurrentExecutionAttempts
@Internal public class FileSystemOutputFormat<T> extends Object implements OutputFormat<T>, FinalizeOnMaster, Serializable, SupportsConcurrentExecutionAttempts
File systemOutputFormat
for batch job. It commits infinalizeGlobal(FinalizationContext)
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FileSystemOutputFormat.Builder<T>
Builder to buildFileSystemOutputFormat
.-
Nested classes/interfaces inherited from interface org.apache.flink.api.common.io.FinalizeOnMaster
FinalizeOnMaster.FinalizationContext
-
Nested classes/interfaces inherited from interface org.apache.flink.api.common.io.OutputFormat
OutputFormat.InitializationContext
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
finalizeGlobal
public void finalizeGlobal(FinalizeOnMaster.FinalizationContext context)
Description copied from interface:FinalizeOnMaster
The method is invoked on the master (JobManager) after all (parallel) instances of an OutputFormat finished.- Specified by:
finalizeGlobal
in interfaceFinalizeOnMaster
- Parameters:
context
- The context to get finalization infos.
-
configure
public void configure(Configuration parameters)
Description copied from interface:OutputFormat
Configures this output format. Since output formats are instantiated generically and hence parameterless, this method is the place where the output formats set their basic fields based on configuration values.This method is always called first on a newly instantiated output format.
- Specified by:
configure
in interfaceOutputFormat<T>
- Parameters:
parameters
- The configuration with all parameters.
-
open
public void open(OutputFormat.InitializationContext context) throws IOException
Description copied from interface:OutputFormat
Opens a parallel instance of the output format to store the result of its parallel instance.When this method is called, the output format it guaranteed to be configured.
- Specified by:
open
in interfaceOutputFormat<T>
- Parameters:
context
- The context to get task parallel infos.- Throws:
IOException
- Thrown, if the output could not be opened due to an I/O problem.
-
writeRecord
public void writeRecord(T record)
Description copied from interface:OutputFormat
Adds a record to the output.When this method is called, the output format it guaranteed to be opened.
- Specified by:
writeRecord
in interfaceOutputFormat<T>
- Parameters:
record
- The records to add to the output.
-
close
public void close() throws IOException
Description copied from interface:OutputFormat
Method that marks the end of the life-cycle of parallel output instance. Should be used to close channels and streams and release resources. After this method returns without an error, the output is assumed to be correct.When this method is called, the output format it guaranteed to be opened.
- Specified by:
close
in interfaceOutputFormat<T>
- Throws:
IOException
- Thrown, if the input could not be closed properly.
-
-