jackye1995 commented on code in PR #4695:
URL: https://github.com/apache/iceberg/pull/4695#discussion_r865460094
##########
aws/src/main/java/org/apache/iceberg/aws/lakeformation/LakeFormationAwsClientFactory.java:
##########
@@ -135,24 +141,57 @@ private LakeFormationClient lakeFormation() {
static class LakeFormationCredentialsProvider implements
AwsCredentialsProvider {
private LakeFormationClient client;
private String tableArn;
+ private final long expiryLeadTimeForRefreshInMins;
+
+ private LakeFormationTemporaryCredentials cachedCredentials;
+ private final Cache<String, LakeFormationTemporaryCredentials> cache;
LakeFormationCredentialsProvider(LakeFormationClient lakeFormationClient,
String tableArn) {
this.client = lakeFormationClient;
this.tableArn = tableArn;
+ this.expiryLeadTimeForRefreshInMins = 1;
+ this.cache = Caffeine.newBuilder()
Review Comment:
So this cache is basically used only for its locking feature. This should
work, but wondering if there is any better and simpler way.
--
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]