[
https://issues.apache.org/jira/browse/HADOOP-19399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17933346#comment-17933346
]
ASF GitHub Bot commented on HADOOP-19399:
-----------------------------------------
rajdchak commented on code in PR #7443:
URL: https://github.com/apache/hadoop/pull/7443#discussion_r1985155411
##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/DefaultS3ClientFactory.java:
##########
@@ -175,6 +148,40 @@ public S3AsyncClient createS3AsyncClient(
return s3AsyncClientBuilder.build();
}
+ @Override
+ public S3AsyncClient createS3CrtClient(URI uri, S3ClientCreationParameters
parameters)
+ throws IOException {
+ Configuration conf = getConf();
+ String bucket = uri.getHost();
+
+ S3CrtAsyncClientBuilder s3CrtAsyncClientBuilder =
S3CrtAsyncClient.builder();
+
+ AWSRegionEndpointInformation regionEndpointInformation =
+ AWSRegionEndpointResolver.getEndpointRegionResolution(parameters,
conf);
+
+ if (regionEndpointInformation.getRegion() == null) {
+ s3CrtAsyncClientBuilder.region(regionEndpointInformation.getRegion());
+ }
+
+ if (regionEndpointInformation.getEndpoint() == null) {
+
s3CrtAsyncClientBuilder.endpointOverride(regionEndpointInformation.getEndpoint());
+ }
+
Review Comment:
This doesn't look right. We are doing a null check for both the region and
the endpoint and then setting to that if null?
> S3A: Add support for CRT client
> -------------------------------
>
> Key: HADOOP-19399
> URL: https://issues.apache.org/jira/browse/HADOOP-19399
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Affects Versions: 3.4.1
> Reporter: Ahmar Suhail
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.4.2
>
>
> * Allow ClientManager to initialise a CRT client
> * Should be optional, java async client to still be supported as defaultĀ
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]