Package org.apache.hadoop.fs.s3a
Class S3ClientFactory.S3ClientCreationParameters
java.lang.Object
org.apache.hadoop.fs.s3a.S3ClientFactory.S3ClientCreationParameters
- Enclosing interface:
- S3ClientFactory
Settings for the S3 Client.
Implemented as a class to pass in so that adding
new parameters does not break the binding of
external implementations of the factory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the client side encryption materials.software.amazon.awssdk.auth.credentials.AwsCredentialsProviderGet the credentials.List<software.amazon.awssdk.core.interceptor.ExecutionInterceptor>List of execution interceptors to include in the chain of interceptors in the SDK.Get the map of headers.Get the KMS region.longGet the minimum part size for transfer parts.longGet the threshold for multipart operations.Get the full s3 path.Get the region.Get the executor that the transfer manager will use to execute background tasks.Get UA suffix.booleanGet the analytics accelerator enabled flag.booleanbooleanIs checksum validation on every request enabled?booleanGet the client side encryption flag.booleanShould s3express createSession be called?booleanGet the FIPS flag.booleanShould MD5 headers be added?booleanGet the multipart flag.booleanbooleanIs this a requester pays bucket?booleantoString()withAnalyticsAcceleratorEnabled(boolean value) Set the analytics accelerator enabled flag.withChecksumCalculationEnabled(boolean value) Set builder value.withChecksumValidationEnabled(boolean value) Set builder value.withClientSideEncryptionEnabled(boolean value) Set the client side encryption flag.Set the client side encryption materials.withCredentialSet(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider value) Set credentials.withEndpoint(String value) Set endpoint.withExecutionInterceptors(List<software.amazon.awssdk.core.interceptor.ExecutionInterceptor> interceptors) List of execution interceptors.withExpressCreateSession(boolean value) Set builder value.withFipsEnabled(boolean value) Set builder value.withHeader(String header, String value) Add a custom header.withKMSRegion(String value) Set the KMS client region.withMd5HeaderEnabled(boolean value) Set builder value.withMetrics(StatisticsFromAwsSdk statistics) Metrics binding.withMinimumPartSize(long value) Set the minimum part size for transfer parts.withMultipartCopyEnabled(boolean value) Set the multipart flag..withMultipartThreshold(long value) Set the threshold for multipart operations.withPathStyleAccess(boolean value) Set path access option.withPathUri(URI value) Set full s3a path.withRegion(String value) Set region.withRequesterPays(boolean value) Set requester pays option.withS3ExpressStore(boolean value) Set builder value.Set the executor that the transfer manager will use to execute background tasks.withUserAgentSuffix(String value) Set UA suffix.
-
Constructor Details
-
S3ClientCreationParameters
public S3ClientCreationParameters()
-
-
Method Details
-
getExecutionInterceptors
public List<software.amazon.awssdk.core.interceptor.ExecutionInterceptor> getExecutionInterceptors()List of execution interceptors to include in the chain of interceptors in the SDK.- Returns:
- the interceptors list
-
withExecutionInterceptors
public S3ClientFactory.S3ClientCreationParameters withExecutionInterceptors(@Nullable List<software.amazon.awssdk.core.interceptor.ExecutionInterceptor> interceptors) List of execution interceptors.- Parameters:
interceptors- interceptors list.- Returns:
- this object
-
getMetrics
-
withMetrics
public S3ClientFactory.S3ClientCreationParameters withMetrics(@Nullable StatisticsFromAwsSdk statistics) Metrics binding. This is the S3A-level statistics interface, which will be wired up to the AWS callbacks.- Parameters:
statistics- statistics implementation- Returns:
- this object
-
withRequesterPays
Set requester pays option.- Parameters:
value- new value- Returns:
- the builder
-
isRequesterPays
public boolean isRequesterPays()Is this a requester pays bucket?- Returns:
- true if the bucket is requester pays.
-
getCredentialSet
public software.amazon.awssdk.auth.credentials.AwsCredentialsProvider getCredentialSet()Get the credentials.- Returns:
- the credential provider.
-
withCredentialSet
public S3ClientFactory.S3ClientCreationParameters withCredentialSet(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider value) Set credentials.- Parameters:
value- new value- Returns:
- the builder
-
getUserAgentSuffix
Get UA suffix.- Returns:
- suffix.
-
withUserAgentSuffix
Set UA suffix.- Parameters:
value- new value- Returns:
- the builder
-
getEndpoint
-
withEndpoint
Set endpoint.- Parameters:
value- new value- Returns:
- the builder
-
isPathStyleAccess
public boolean isPathStyleAccess() -
withPathStyleAccess
Set path access option.- Parameters:
value- new value- Returns:
- the builder
-
withHeader
Add a custom header.- Parameters:
header- header namevalue- new value- Returns:
- the builder
-
getHeaders
Get the map of headers.- Returns:
- (mutable) header map
-
getPathUri
Get the full s3 path. added in HADOOP-18330- Returns:
- path URI
-
withPathUri
Set full s3a path. added in HADOOP-18330- Parameters:
value- new value- Returns:
- the builder
-
getMinimumPartSize
public long getMinimumPartSize()Get the minimum part size for transfer parts.- Returns:
- part size
-
withMinimumPartSize
Set the minimum part size for transfer parts.- Parameters:
value- new value- Returns:
- the builder
-
getMultiPartThreshold
public long getMultiPartThreshold()Get the threshold for multipart operations.- Returns:
- multipart threshold
-
withMultipartThreshold
Set the threshold for multipart operations.- Parameters:
value- new value- Returns:
- the builder
-
getTransferManagerExecutor
Get the executor that the transfer manager will use to execute background tasks.- Returns:
- part size
-
withTransferManagerExecutor
Set the executor that the transfer manager will use to execute background tasks.- Parameters:
value- new value- Returns:
- the builder
-
withMultipartCopyEnabled
Set the multipart flag..- Parameters:
value- new value- Returns:
- the builder
-
isMultipartCopy
public boolean isMultipartCopy()Get the multipart flag.- Returns:
- multipart flag
-
withRegion
Set region.- Parameters:
value- new value- Returns:
- the builder
-
withClientSideEncryptionEnabled
Set the client side encryption flag.- Parameters:
value- new value- Returns:
- the builder
-
withAnalyticsAcceleratorEnabled
Set the analytics accelerator enabled flag.- Parameters:
value- new value- Returns:
- the builder
-
withKMSRegion
Set the KMS client region. This is required for CSE-KMS- Parameters:
value- new value- Returns:
- the builder
-
isClientSideEncryptionEnabled
public boolean isClientSideEncryptionEnabled()Get the client side encryption flag.- Returns:
- client side encryption flag
-
isAnalyticsAcceleratorEnabled
public boolean isAnalyticsAcceleratorEnabled()Get the analytics accelerator enabled flag.- Returns:
- analytics accelerator enabled flag.
-
withClientSideEncryptionMaterials
public S3ClientFactory.S3ClientCreationParameters withClientSideEncryptionMaterials(CSEMaterials value) Set the client side encryption materials.- Parameters:
value- new value- Returns:
- the builder
-
getClientSideEncryptionMaterials
Get the client side encryption materials.- Returns:
- client side encryption materials
-
getRegion
Get the region.- Returns:
- invoker
-
getKmsRegion
Get the KMS region.- Returns:
- Configured KMS region.
-
isS3ExpressStore
public boolean isS3ExpressStore() -
withS3ExpressStore
Set builder value.- Parameters:
value- new value- Returns:
- the builder
-
isExpressCreateSession
public boolean isExpressCreateSession()Should s3express createSession be called?- Returns:
- true if the client should enable createSession.
-
withExpressCreateSession
Set builder value.- Parameters:
value- new value- Returns:
- the builder
-
withChecksumValidationEnabled
Set builder value.- Parameters:
value- new value- Returns:
- the builder
-
isChecksumValidationEnabled
public boolean isChecksumValidationEnabled()Is checksum validation on every request enabled?- Returns:
- true if validation is on every request.
-
isMd5HeaderEnabled
public boolean isMd5HeaderEnabled()Should MD5 headers be added?- Returns:
- true to always add an MD5 header.
-
withMd5HeaderEnabled
Set builder value.- Parameters:
value- new value- Returns:
- the builder
-
isChecksumCalculationEnabled
public boolean isChecksumCalculationEnabled() -
withChecksumCalculationEnabled
Set builder value.- Parameters:
value- new value- Returns:
- the builder
-
toString
-
isFipsEnabled
public boolean isFipsEnabled()Get the FIPS flag.- Returns:
- is fips enabled
-
withFipsEnabled
Set builder value.- Parameters:
value- new value- Returns:
- the builder
-