[ 
https://issues.apache.org/jira/browse/HADOOP-19050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17813422#comment-17813422
 ] 

ASF GitHub Bot commented on HADOOP-19050:
-----------------------------------------

jxhan3 commented on code in PR #6507:
URL: https://github.com/apache/hadoop/pull/6507#discussion_r1475271643


##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/DefaultS3ClientFactory.java:
##########
@@ -370,4 +375,18 @@ private static Region getS3RegionFromEndpoint(String 
endpoint) {
     return Region.US_EAST_1;
   }
 
+  public static <BuilderT extends S3BaseClientBuilder<BuilderT, ClientT>, 
ClientT> void
+      applyS3AccessGrantsConfigurations(BuilderT builder, Configuration conf) {
+    boolean s3agEnabled = conf.getBoolean(AWS_S3_ACCESS_GRANTS_ENABLED, false);
+    if (s3agEnabled) {
+      boolean s3agFallbackEnabled = conf.getBoolean(
+          AWS_S3_ACCESS_GRANTS_FALLBACK_TO_IAM_ENABLED, false);
+      S3AccessGrantsPlugin accessGrantsPlugin =
+          
S3AccessGrantsPlugin.builder().enableFallback(s3agFallbackEnabled).build();
+      builder.addPlugin(accessGrantsPlugin);
+      LOG.info("s3ag plugin is added to s3 client with fallback: {}", 
s3agFallbackEnabled);

Review Comment:
   changed in next version





> Add S3 Access Grants Support in S3A
> -----------------------------------
>
>                 Key: HADOOP-19050
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19050
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs/s3
>    Affects Versions: 3.4.0
>            Reporter: Jason Han
>            Assignee: Jason Han
>            Priority: Minor
>              Labels: pull-request-available
>
> Add support for S3 Access Grants 
> (https://aws.amazon.com/s3/features/access-grants/) in S3A.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to