public interface FileIO
extends java.io.Serializable
Both table metadata files and data files can be written and read by this module. Implementations must be serializable because various clients of Spark tables may initialize this once and pass it off to a separate module that would then interact with the streams.
Modifier and Type | Method and Description |
---|---|
default void |
deleteFile(InputFile file)
|
default void |
deleteFile(OutputFile file)
Convenience method to
delete an OutputFile . |
void |
deleteFile(java.lang.String path)
Delete the file at the given path.
|
default void |
initialize(java.util.Map<java.lang.String,java.lang.String> properties)
Initialize File IO from catalog properties.
|
InputFile |
newInputFile(java.lang.String path)
Get a
InputFile instance to read bytes from the file at the given path. |
OutputFile |
newOutputFile(java.lang.String path)
Get a
OutputFile instance to write bytes to the file at the given path. |
InputFile newInputFile(java.lang.String path)
InputFile
instance to read bytes from the file at the given path.OutputFile newOutputFile(java.lang.String path)
OutputFile
instance to write bytes to the file at the given path.void deleteFile(java.lang.String path)
default void deleteFile(InputFile file)
default void deleteFile(OutputFile file)
delete
an OutputFile
.default void initialize(java.util.Map<java.lang.String,java.lang.String> properties)
properties
- catalog properties