Class HadoopRenameFileCommitter
- java.lang.Object
-
- org.apache.flink.formats.hadoop.bulk.committer.HadoopRenameFileCommitter
-
- All Implemented Interfaces:
HadoopFileCommitter
public class HadoopRenameFileCommitter extends Object implements HadoopFileCommitter
The Hadoop file committer that directly rename the in-progress file to the target file. For FileSystem like S3, renaming may lead to additional copies.
-
-
Constructor Summary
Constructors Constructor Description HadoopRenameFileCommitter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path targetFilePath)HadoopRenameFileCommitter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path targetFilePath, org.apache.hadoop.fs.Path inProgressPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommit()Commits the in-progress file to the target path.voidcommitAfterRecovery()Re-commits the in-progress file to the target path after fail-over.org.apache.hadoop.fs.PathgetTargetFilePath()Gets the target path to commit to.org.apache.hadoop.fs.PathgetTempFilePath()Gets the path of the intermediate file to commit.voidpreCommit()Prepares the intermediates file for committing.
-
-
-
Constructor Detail
-
HadoopRenameFileCommitter
public HadoopRenameFileCommitter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path targetFilePath) throws IOException- Throws:
IOException
-
HadoopRenameFileCommitter
public HadoopRenameFileCommitter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path targetFilePath, org.apache.hadoop.fs.Path inProgressPath) throws IOException- Throws:
IOException
-
-
Method Detail
-
getTargetFilePath
public org.apache.hadoop.fs.Path getTargetFilePath()
Description copied from interface:HadoopFileCommitterGets the target path to commit to.- Specified by:
getTargetFilePathin interfaceHadoopFileCommitter- Returns:
- The target path to commit to.
-
getTempFilePath
public org.apache.hadoop.fs.Path getTempFilePath()
Description copied from interface:HadoopFileCommitterGets the path of the intermediate file to commit.- Specified by:
getTempFilePathin interfaceHadoopFileCommitter- Returns:
- The path of the intermediate file to commit.
-
preCommit
public void preCommit()
Description copied from interface:HadoopFileCommitterPrepares the intermediates file for committing.- Specified by:
preCommitin interfaceHadoopFileCommitter
-
commit
public void commit() throws IOExceptionDescription copied from interface:HadoopFileCommitterCommits the in-progress file to the target path.- Specified by:
commitin interfaceHadoopFileCommitter- Throws:
IOException
-
commitAfterRecovery
public void commitAfterRecovery() throws IOExceptionDescription copied from interface:HadoopFileCommitterRe-commits the in-progress file to the target path after fail-over.- Specified by:
commitAfterRecoveryin interfaceHadoopFileCommitter- Throws:
IOException
-
-