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 newSeekableChannelsProvidercompatible for reading from and writing to the given URI scheme using the givenFileIOimplementation.static FileIOAdapterfromServiceLoader(@NotNull URI tableLocation, @NotNull org.apache.iceberg.io.FileIO io) Create aFileIOAdapterthat is compatible with the given URI scheme andFileIOimplementation.booleanisCompatible(@NotNull String uriScheme, @NotNull Class<?> ioClass) Check if this adapter is compatible with the given URI scheme and file IO of the given class.booleanisCompatible(@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 aFileIOAdapterthat is compatible with the given URI scheme andFileIOimplementation.- Parameters:
tableLocation- TheTable.location()URI of the table.io- TheFileIOimplementation 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 newSeekableChannelsProvidercompatible for reading from and writing to the given URI scheme using the givenFileIOimplementation. For example, for an "s3" URI, we will create aSeekableChannelsProviderwhich can read files from S3.- Parameters:
uriScheme- The URI schemeio- TheFileIOimplementation to use.specialInstructions- An optional object to pass special instructions to the provider.
-