RussellSpitzer commented on code in PR #7066:
URL: https://github.com/apache/iceberg/pull/7066#discussion_r1140423548
##########
aws/src/main/java/org/apache/iceberg/aws/AwsProperties.java:
##########
@@ -1249,6 +1314,39 @@ private boolean s3KeyIdAccessKeyBothConfigured() {
return (s3AccessKeyId == null) == (s3SecretAccessKey == null);
}
+ private AwsCredentialsProvider credentialsProvider(String
credentialsProviderClazz) {
Review Comment:
In this case I would probably first look for a "map" create method and pass
an empty map if we have no properties. If we don't have no-arg create method we
can fall back to that if the first method doesn't exist. I think your filter
code above guarantees that properties is non-null but we can check that.
@jackye1995 knows more about what credential providers there are, but I'm
surprised that having a constructor is that rare. Anyway I definitely think we
should always call a "create(map) if that exists"
```java
try {
getCreate(Map)
invokeMapCreate(properties)
} catch (NoSuchMethod) {
try {
getCreate()
invokeCreate()
}
}
```
--
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]