Class DeephavenAwsClientFactory

java.lang.Object
io.deephaven.extensions.s3.DeephavenAwsClientFactory
All Implemented Interfaces:
Serializable, org.apache.iceberg.aws.AwsClientFactory, org.apache.iceberg.aws.s3.S3FileIOAwsClientFactory

public final class DeephavenAwsClientFactory extends Object implements org.apache.iceberg.aws.AwsClientFactory, org.apache.iceberg.aws.s3.S3FileIOAwsClientFactory
An AwsClientFactory and S3FileIOAwsClientFactory implementation that assumes ownership of AWS client creation as configured via S3Instructions.
See Also:
  • Constructor Details

    • DeephavenAwsClientFactory

      public DeephavenAwsClientFactory()
  • Method Details

    • addToProperties

      public static Runnable addToProperties(S3Instructions instructions, Map<String,String> propertiesOut)
      Adds DeephavenAwsClientFactory to propertiesOut with the keys "client.factory" and "s3.client-factory-impl"; it is an error if either of these properties is already set. After the corresponding Catalog is no longer in use, the caller should invoke the returned Runnable to clean up.
      Parameters:
      instructions - the instructions
      propertiesOut - the properties
      Returns:
      the runnable to be invoked after initialization
    • getInstructions

      public static Optional<S3Instructions> getInstructions(Map<String,String> properties)
      Get the S3Instructions as set in the corresponding addToProperties(S3Instructions, Map) if the properties were built with that. If the properties were built with addToProperties(S3Instructions, Map), but the Runnable was already invoked for cleanup, an IllegalStateException will be thrown.
      Parameters:
      properties - the properties
      Returns:
      the instructions
    • initialize

      public void initialize(Map<String,String> properties)
      Specified by:
      initialize in interface org.apache.iceberg.aws.AwsClientFactory
      Specified by:
      initialize in interface org.apache.iceberg.aws.s3.S3FileIOAwsClientFactory
    • s3

      public software.amazon.awssdk.services.s3.S3Client s3()
      Specified by:
      s3 in interface org.apache.iceberg.aws.AwsClientFactory
      Specified by:
      s3 in interface org.apache.iceberg.aws.s3.S3FileIOAwsClientFactory
    • glue

      public software.amazon.awssdk.services.glue.GlueClient glue()
      Specified by:
      glue in interface org.apache.iceberg.aws.AwsClientFactory
    • kms

      public software.amazon.awssdk.services.kms.KmsClient kms()
      Specified by:
      kms in interface org.apache.iceberg.aws.AwsClientFactory
    • dynamo

      public software.amazon.awssdk.services.dynamodb.DynamoDbClient dynamo()
      Specified by:
      dynamo in interface org.apache.iceberg.aws.AwsClientFactory