Package org.apache.iceberg.io
Interface OutputFile
-
- All Known Subinterfaces:
NativeEncryptionOutputFile
- All Known Implementing Classes:
AesGcmOutputFile
,HadoopOutputFile
,InMemoryOutputFile
,S3OutputFile
public interface OutputFile
An interface used to create output files usingPositionOutputStream
instances.This class is based on Parquet's InputFile.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PositionOutputStream
create()
Create a new file and return aPositionOutputStream
to it.PositionOutputStream
createOrOverwrite()
Create a new file and return aPositionOutputStream
to it.java.lang.String
location()
Return the location this output file will create.InputFile
toInputFile()
Return anInputFile
for the location of this output file.
-
-
-
Method Detail
-
create
PositionOutputStream create()
Create a new file and return aPositionOutputStream
to it.If the file already exists, this will throw an exception.
- Returns:
- an output stream that can report its position
- Throws:
AlreadyExistsException
- If the path already existsRuntimeIOException
- If the implementation throws anIOException
-
createOrOverwrite
PositionOutputStream createOrOverwrite()
Create a new file and return aPositionOutputStream
to it.If the file already exists, this will not throw an exception and will replace the file.
- Returns:
- an output stream that can report its position
- Throws:
RuntimeIOException
- If the implementation throws anIOException
java.lang.SecurityException
- If staging directory creation fails due to missing JVM level permission
-
location
java.lang.String location()
Return the location this output file will create.- Returns:
- the location of this output file
-
-