public class ClientManagerImpl extends Object implements ClientManager
close()
.
Updates Statistic.STORE_CLIENT_CREATION
to track count and duration of client creation.Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
ClientManagerImpl(S3ClientFactory clientFactory,
S3ClientFactory.S3ClientCreationParameters clientCreationParameters,
org.apache.hadoop.fs.statistics.DurationTrackerFactory durationTrackerFactory)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close() is synchronized to avoid race conditions between
slow client creation and this close operation.
|
software.amazon.awssdk.services.s3.S3AsyncClient |
getOrCreateAsyncClient()
Get the Async S3Client,raising a failure to create as an IOException.
|
software.amazon.awssdk.services.s3.S3Client |
getOrCreateAsyncS3ClientUnchecked()
Get the AsyncS3Client, raising a failure to create as an UncheckedIOException.
|
software.amazon.awssdk.services.s3.S3Client |
getOrCreateS3Client()
Get the S3Client, raising a failure to create as an IOException.
|
software.amazon.awssdk.services.s3.S3Client |
getOrCreateS3ClientUnchecked()
Get the S3Client, raising a failure to create as an UncheckedIOException.
|
software.amazon.awssdk.transfer.s3.S3TransferManager |
getOrCreateTransferManager()
Get the transfer manager, creating it and any dependencies if needed.
|
URI |
getUri()
Get the URI of the filesystem.
|
String |
toString() |
public ClientManagerImpl(S3ClientFactory clientFactory, S3ClientFactory.S3ClientCreationParameters clientCreationParameters, org.apache.hadoop.fs.statistics.DurationTrackerFactory durationTrackerFactory)
clientFactory
- client factory to invokeclientCreationParameters
- creation parameters.durationTrackerFactory
- duration tracker.public software.amazon.awssdk.services.s3.S3Client getOrCreateS3Client() throws IOException
ClientManager
getOrCreateS3Client
in interface ClientManager
IOException
- failure to create the client.public software.amazon.awssdk.services.s3.S3Client getOrCreateS3ClientUnchecked() throws UncheckedIOException
getOrCreateS3ClientUnchecked
in interface ClientManager
UncheckedIOException
- failure to create the client.public software.amazon.awssdk.services.s3.S3AsyncClient getOrCreateAsyncClient() throws IOException
ClientManager
getOrCreateAsyncClient
in interface ClientManager
IOException
- failure to create the client.public software.amazon.awssdk.services.s3.S3Client getOrCreateAsyncS3ClientUnchecked() throws UncheckedIOException
getOrCreateAsyncS3ClientUnchecked
in interface ClientManager
UncheckedIOException
- failure to create the client.public software.amazon.awssdk.transfer.s3.S3TransferManager getOrCreateTransferManager() throws IOException
ClientManager
getOrCreateTransferManager
in interface ClientManager
IOException
- on any failure to create the managerpublic void close()
The objects are all deleted in parallel
close
in interface Closeable
close
in interface AutoCloseable
close
in interface ClientManager
public URI getUri()
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.