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 Type
    Method
    Description
    createProvider(@NotNull String uriScheme, @NotNull org.apache.iceberg.io.FileIO io, @Nullable Object specialInstructions)
    Create a new SeekableChannelsProvider compatible for reading from and writing to the given URI scheme using the given FileIO implementation.
    fromServiceLoader(@NotNull URI tableLocation, @NotNull org.apache.iceberg.io.FileIO io)
    Create a FileIOAdapter that is compatible with the given URI scheme and FileIO 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 a FileIOAdapter that is compatible with the given URI scheme and FileIO implementation.
      Parameters:
      tableLocation - The Table.location() URI of the table.
      io - The FileIO 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

      boolean isCompatible(@NotNull @NotNull String uriScheme, @NotNull @NotNull Class<?> ioClass)
      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 new SeekableChannelsProvider compatible for reading from and writing to the given URI scheme using the given FileIO implementation. For example, for an "s3" URI, we will create a SeekableChannelsProvider which can read files from S3.
      Parameters:
      uriScheme - The URI scheme
      io - The FileIO implementation to use.
      specialInstructions - An optional object to pass special instructions to the provider.