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
ClientManagergetOrCreateS3Client in interface ClientManagerIOException - failure to create the client.public software.amazon.awssdk.services.s3.S3Client getOrCreateS3ClientUnchecked()
throws UncheckedIOException
getOrCreateS3ClientUnchecked in interface ClientManagerUncheckedIOException - failure to create the client.public software.amazon.awssdk.services.s3.S3AsyncClient getOrCreateAsyncClient()
throws IOException
ClientManagergetOrCreateAsyncClient in interface ClientManagerIOException - failure to create the client.public software.amazon.awssdk.services.s3.S3Client getOrCreateAsyncS3ClientUnchecked()
throws UncheckedIOException
getOrCreateAsyncS3ClientUnchecked in interface ClientManagerUncheckedIOException - failure to create the client.public software.amazon.awssdk.transfer.s3.S3TransferManager getOrCreateTransferManager()
throws IOException
ClientManagergetOrCreateTransferManager in interface ClientManagerIOException - on any failure to create the managerpublic void close()
The objects are all deleted in parallel
close in interface Closeableclose in interface AutoCloseableclose in interface ClientManagerpublic URI getUri()
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.