Class S3FileIOFactory

java.lang.Object
org.elasticsearch.xpack.esql.datasource.iceberg.S3FileIOFactory

public final class S3FileIOFactory extends Object
Factory for creating configured S3FileIO instances.

This class provides a way to create Iceberg's S3FileIO without using Hadoop, replacing the previous HadoopCatalog-based approach. S3FileIO uses the AWS SDK directly and works with both real S3 endpoints and test fixtures like S3HttpFixture.

  • Method Details

    • create

      public static org.apache.iceberg.aws.s3.S3FileIO create(S3Configuration s3Config)
      Create and configure an S3FileIO instance with the given S3 configuration.

      The returned S3FileIO is configured for:

      • Static credentials if provided (access key and secret key)
      • Custom endpoint if provided (for testing with S3-compatible services)
      • Region if provided
      • Path-style access (required for MinIO, LocalStack, and S3HttpFixture)
      Parameters:
      s3Config - S3 configuration (nullable - if null, uses default AWS credentials chain)
      Returns:
      configured S3FileIO instance (caller should close when done)
    • create

      public static org.apache.iceberg.aws.s3.S3FileIO create(String accessKey, String secretKey, String endpoint, String region)
      Create and configure an S3FileIO instance from individual configuration values.

      This is a convenience method for cases where the configuration values are available directly rather than through an S3Configuration object.

      Parameters:
      accessKey - S3 access key (nullable)
      secretKey - S3 secret key (nullable)
      endpoint - S3 endpoint URL (nullable)
      region - AWS region (nullable)
      Returns:
      configured S3FileIO instance (caller should close when done)