Package org.apache.iceberg.io
Interface OutputFile
-
- All Known Implementing Classes:
HadoopOutputFile,S3OutputFile
public interface OutputFileAn interface used to create output files usingPositionOutputStreaminstances.This class is based on Parquet's InputFile.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PositionOutputStreamcreate()Create a new file and return aPositionOutputStreamto it.PositionOutputStreamcreateOrOverwrite()Create a new file and return aPositionOutputStreamto it.java.lang.Stringlocation()Return the location this output file will create.InputFiletoInputFile()Return anInputFilefor the location of this output file.
-
-
-
Method Detail
-
create
PositionOutputStream create()
Create a new file and return aPositionOutputStreamto 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 aPositionOutputStreamto 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 anIOExceptionjava.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
-
-