JonasJ-ap commented on code in PR #5684:
URL: https://github.com/apache/iceberg/pull/5684#discussion_r962418030


##########
aws/src/main/java/org/apache/iceberg/aws/AssumeRoleAwsClientFactory.java:
##########
@@ -91,37 +93,26 @@ public void initialize(Map<String, String> properties) {
     Preconditions.checkNotNull(
         region, "Cannot initialize AssumeRoleClientConfigFactory with null 
region");
 
-    this.s3Endpoint = properties.get(AwsProperties.S3FILEIO_ENDPOINT);
     this.tags = toTags(properties);

Review Comment:
   There is a small problem if we move the tags into `AwsProperties`:
   
   In `AwsProperties.java`, there exists a method whose name is also 
[`toTags`](https://github.com/apache/iceberg/blob/0e42a360c3d772b18ccd6eb5231a2f9344b66e28/aws/src/main/java/org/apache/iceberg/aws/AwsProperties.java#L729)
 and relies on `software.amazon.awssdk.services.s3.model.Tag` to parse two S3 
tags. If we want to move this `toTags` in `AssumeRoleClientFactories.java` 
(which relies on `software.amazon.awssdk.services.sts.model.Tag`)to 
awsproperties, then we need to write:
   ```
   private final Set<software.amazon.awssdk.services.sts.model.Tag> 
clientAssumeRoleTags;
   ...
   private Set<software.amazon.awssdk.services.sts.model.Tag> 
toStsTags(Map<String, String> properties) {
       return PropertyUtil.propertiesWithPrefix(
                       properties, CLIENT_ASSUME_ROLE_TAGS_PREFIX)
               .entrySet().stream()
               .map(e -> 
software.amazon.awssdk.services.sts.model.Tag.builder().key(e.getKey()).value(e.getValue()).build())
               .collect(Collectors.toSet());
     }
   ```
   to resolve the name conflicting issue.
   
   I do not know if refactoring in this way is the desired behavior. Could you 
please give me some suggestions?



-- 
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]

Reply via email to