Package io.deephaven.extensions.s3
Class S3InstructionsBasedAwsClientFactory
java.lang.Object
io.deephaven.extensions.s3.S3InstructionsBasedAwsClientFactory
- All Implemented Interfaces:
Serializable,org.apache.iceberg.aws.AwsClientFactory,org.apache.iceberg.aws.s3.S3FileIOAwsClientFactory
public final class S3InstructionsBasedAwsClientFactory
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RunnableaddToProperties(S3Instructions instructions, Map<String, String> propertiesOut) AddsS3InstructionsBasedAwsClientFactorytopropertiesOutwith the keys "client.factory" and "s3.client-factory-impl"; it is an error if either of these properties is already set.software.amazon.awssdk.services.dynamodb.DynamoDbClientdynamo()static Optional<S3Instructions>getInstructions(Map<String, String> properties) Get theS3Instructionsas set in the correspondingaddToProperties(S3Instructions, Map)if the properties were built with that.software.amazon.awssdk.services.glue.GlueClientglue()voidinitialize(Map<String, String> properties) software.amazon.awssdk.services.kms.KmsClientkms()software.amazon.awssdk.services.s3.S3Clients3()software.amazon.awssdk.services.s3.S3AsyncClients3Async()
-
Constructor Details
-
S3InstructionsBasedAwsClientFactory
public S3InstructionsBasedAwsClientFactory()
-
-
Method Details
-
addToProperties
public static Runnable addToProperties(S3Instructions instructions, Map<String, String> propertiesOut) AddsS3InstructionsBasedAwsClientFactorytopropertiesOutwith the keys "client.factory" and "s3.client-factory-impl"; it is an error if either of these properties is already set. After the correspondingCatalogis no longer in use, the caller should invoke the returnedRunnableto clean up.- Parameters:
instructions- the instructionspropertiesOut- the properties- Returns:
- the runnable to be invoked after initialization
-
getInstructions
Get theS3Instructionsas set in the correspondingaddToProperties(S3Instructions, Map)if the properties were built with that. If the properties were built withaddToProperties(S3Instructions, Map), but theRunnablewas already invoked for cleanup, anIllegalStateExceptionwill be thrown.- Parameters:
properties- the properties- Returns:
- the instructions
-
initialize
- Specified by:
initializein interfaceorg.apache.iceberg.aws.AwsClientFactory- Specified by:
initializein interfaceorg.apache.iceberg.aws.s3.S3FileIOAwsClientFactory
-
s3
public software.amazon.awssdk.services.s3.S3Client s3()- Specified by:
s3in interfaceorg.apache.iceberg.aws.AwsClientFactory- Specified by:
s3in interfaceorg.apache.iceberg.aws.s3.S3FileIOAwsClientFactory
-
s3Async
public software.amazon.awssdk.services.s3.S3AsyncClient s3Async()- Specified by:
s3Asyncin interfaceorg.apache.iceberg.aws.AwsClientFactory- Specified by:
s3Asyncin interfaceorg.apache.iceberg.aws.s3.S3FileIOAwsClientFactory
-
glue
public software.amazon.awssdk.services.glue.GlueClient glue()- Specified by:
gluein interfaceorg.apache.iceberg.aws.AwsClientFactory
-
kms
public software.amazon.awssdk.services.kms.KmsClient kms()- Specified by:
kmsin interfaceorg.apache.iceberg.aws.AwsClientFactory
-
dynamo
public software.amazon.awssdk.services.dynamodb.DynamoDbClient dynamo()- Specified by:
dynamoin interfaceorg.apache.iceberg.aws.AwsClientFactory
-