Package io.deephaven.iceberg.util
Interface FileIOAdapter
- All Known Implementing Classes:
FileIOAdapterBase
,GCSFileIOAdapter
,LocalFileIOAdapter
,S3FallbackFileIOAdapter
,S3FileIOAdapter
public interface FileIOAdapter
A plugin interface for providing
SeekableChannelsProvider
implementations for different URI schemes using a
given FileIO
implementation.-
Method Summary
Modifier and TypeMethodDescriptioncreateProvider
(@NotNull String uriScheme, @NotNull org.apache.iceberg.io.FileIO io, @Nullable Object specialInstructions) Create a newSeekableChannelsProvider
compatible for reading from and writing to the given URI scheme using the givenFileIO
implementation.static FileIOAdapter
fromServiceLoader
(@NotNull URI tableLocation, @NotNull org.apache.iceberg.io.FileIO io) Create aFileIOAdapter
that is compatible with the given URI scheme andFileIO
implementation.boolean
isCompatible
(@NotNull String uriScheme, @NotNull Class<?> ioClass) Check if this adapter is compatible with the given URI scheme and file IO of the given class.boolean
isCompatible
(@NotNull String uriScheme, @NotNull org.apache.iceberg.io.FileIO io) Check if this adapter is compatible with the given URI scheme and file IO.
-
Method Details
-
fromServiceLoader
static FileIOAdapter fromServiceLoader(@NotNull @NotNull URI tableLocation, @NotNull @NotNull org.apache.iceberg.io.FileIO io) Create aFileIOAdapter
that is compatible with the given URI scheme andFileIO
implementation.- Parameters:
tableLocation
- TheTable.location()
URI of the table.io
- TheFileIO
implementation to use.
-
isCompatible
boolean isCompatible(@NotNull @NotNull String uriScheme, @NotNull @NotNull org.apache.iceberg.io.FileIO io) Check if this adapter is compatible with the given URI scheme and file IO. -
isCompatible
Check if this adapter is compatible with the given URI scheme and file IO of the given class. -
createProvider
SeekableChannelsProvider createProvider(@NotNull @NotNull String uriScheme, @NotNull @NotNull org.apache.iceberg.io.FileIO io, @Nullable @Nullable Object specialInstructions) Create a newSeekableChannelsProvider
compatible for reading from and writing to the given URI scheme using the givenFileIO
implementation. For example, for an "s3" URI, we will create aSeekableChannelsProvider
which can read files from S3.- Parameters:
uriScheme
- The URI schemeio
- TheFileIO
implementation to use.specialInstructions
- An optional object to pass special instructions to the provider.
-