public interface AtomicFileWriter
AtomicFsDataOutputStream
.The streams do not make the files
they write to immediately visible, but instead write to temp files or other temporary storage. To
publish the data atomically in the end, the stream offers the RenamingAtomicFsDataOutputStream.closeAndCommit()
method to publish the result.Modifier and Type | Method and Description |
---|---|
static AtomicFileWriter |
create(org.apache.flink.core.fs.FileSystem fs) |
AtomicFsDataOutputStream |
open(org.apache.flink.core.fs.Path path)
Opens a new atomic stream to write to the given path.
|
static boolean |
writeFileUtf8(AtomicFileWriter writer,
org.apache.flink.core.fs.Path path,
String content) |
static boolean |
writeFileUtf8(org.apache.flink.core.fs.Path path,
String content)
Write an utf8 string to file.
|
AtomicFsDataOutputStream open(org.apache.flink.core.fs.Path path) throws IOException
IOException
static AtomicFileWriter create(org.apache.flink.core.fs.FileSystem fs) throws IOException
IOException
static boolean writeFileUtf8(org.apache.flink.core.fs.Path path, String content) throws IOException
IOException
@VisibleForTesting static boolean writeFileUtf8(AtomicFileWriter writer, org.apache.flink.core.fs.Path path, String content) throws IOException
IOException
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.