[ 
https://issues.apache.org/jira/browse/HADOOP-19399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17933352#comment-17933352
 ] 

ASF GitHub Bot commented on HADOOP-19399:
-----------------------------------------

ahmarsuhail commented on code in PR #7443:
URL: https://github.com/apache/hadoop/pull/7443#discussion_r1985232083


##########
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:
   thanks, it was not right :) fixed!





> 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: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to