Package org.apache.iceberg.inmemory
Class InMemoryOutputFile
java.lang.Object
org.apache.iceberg.inmemory.InMemoryOutputFile
- All Implemented Interfaces:
- OutputFile
- 
Constructor SummaryConstructorsConstructorDescriptionInMemoryOutputFile(String location) InMemoryOutputFile(String location, InMemoryFileIO parentFileIO) If the optional parentFileIO is provided, file-existence behaves similarly to S3FileIO; existence checks are performed up-front if creating without overwrite, but files only exist in the parentFileIO if close() has been called on the associated output streams (or pre-existing files are populated into the parentFileIO through other means).
- 
Method SummaryModifier and TypeMethodDescriptioncreate()Create a new file and return aPositionOutputStreamto it.Create a new file and return aPositionOutputStreamto it.location()Return the location this output file will create.byte[]Return anInputFilefor the location of this output file.
- 
Constructor Details- 
InMemoryOutputFilepublic InMemoryOutputFile()
- 
InMemoryOutputFile
- 
InMemoryOutputFileIf the optional parentFileIO is provided, file-existence behaves similarly to S3FileIO; existence checks are performed up-front if creating without overwrite, but files only exist in the parentFileIO if close() has been called on the associated output streams (or pre-existing files are populated into the parentFileIO through other means).- Parameters:
- location- the location returned by location() of this OutputFile, the InputFile obtained from calling toInputFile(), and the location for looking up the associated InputFile from a parentFileIO, if non-null.
- parentFileIO- if non-null, commits an associated InMemoryInputFile on close() into the parentFileIO, and uses the parentFileIO for "already exists" checks if creating without overwriting.
 
 
- 
- 
Method Details- 
createDescription copied from interface:OutputFileCreate a new file and return aPositionOutputStreamto it.If the file already exists, this will throw an exception. - Specified by:
- createin interface- OutputFile
- Returns:
- an output stream that can report its position
 
- 
createOrOverwriteDescription copied from interface:OutputFileCreate a new file and return aPositionOutputStreamto it.If the file already exists, this will not throw an exception and will replace the file. - Specified by:
- createOrOverwritein interface- OutputFile
- Returns:
- an output stream that can report its position
 
- 
locationDescription copied from interface:OutputFileReturn the location this output file will create.- Specified by:
- locationin interface- OutputFile
- Returns:
- the location of this output file
 
- 
toInputFileDescription copied from interface:OutputFileReturn anInputFilefor the location of this output file.- Specified by:
- toInputFilein interface- OutputFile
- Returns:
- an input file for the location of this output file
 
- 
toByteArraypublic byte[] toByteArray()
 
-