steveloughran commented on code in PR #5421:
URL: https://github.com/apache/hadoop/pull/5421#discussion_r1172532430
##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java:
##########
@@ -975,10 +975,16 @@ private void bindAWSClient(URI name, boolean dtEnabled)
throws IOException {
S3ClientFactory clientFactory =
ReflectionUtils.newInstance(s3ClientFactoryClass, conf);
s3Client = clientFactory.createS3Client(getUri(), parameters);
- s3AsyncClient = clientFactory.createS3AsyncClient(getUri(), parameters);
+ setS3AsyncClient(clientFactory, parameters);
transferManager = clientFactory.createS3TransferManager(s3AsyncClient);
}
+ // set in synchronized method to suppress spotbugs error.
Review Comment:
1. give it a name like `createS3AsyncClient` as it is more than a simple
setter
2. comment should be a javadoc so IDEs preview it.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]