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? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org