[
https://issues.apache.org/jira/browse/HADOOP-19286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17884512#comment-17884512
]
ASF GitHub Bot commented on HADOOP-19286:
-----------------------------------------
shameersss1 commented on code in PR #7067:
URL: https://github.com/apache/hadoop/pull/7067#discussion_r1774589288
##########
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEndpointRegion.java:
##########
@@ -346,6 +347,37 @@ public void
testCentralEndpointAndDifferentRegionThanBucket() throws Throwable {
assertRequesterPaysFileExistence(newConf);
}
+ @Test
+ public void testWithOutCrossRegionAccess() throws Exception {
+ describe("Verify cross region access fails when disabled");
+ final Configuration newConf = new Configuration(getConfiguration());
+ // skip the test if the region is eu-west-2
+ String region =
getFileSystem().getS3AInternals().getBucketMetadata().bucketRegion();
+ if (EU_WEST_2.equals(region)) {
Review Comment:
1. Ack.
2. As per the doc
(https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/s3-cross-region.html)
```
When you reference an existing bucket in a request, such as when you use the
putObject method, the SDK initiates a request to the Region configured for the
client.
If the bucket does not exist in that specific Region, the error response
includes the actual Region where the bucket resides. The SDK then uses the
correct Region in a second request.
To optimize future requests to the same bucket, the SDK caches this Region
mapping in the client.
```
So as per the implementation, It looks like it won't be supported by
thirdparty store and each store have to implement it separately.
> Support S3A cross region access when S3 region/endpoint is set
> --------------------------------------------------------------
>
> Key: HADOOP-19286
> URL: https://issues.apache.org/jira/browse/HADOOP-19286
> Project: Hadoop Common
> Issue Type: Improvement
> Components: fs/s3
> Affects Versions: 3.4.0
> Reporter: Syed Shameerur Rahman
> Assignee: Syed Shameerur Rahman
> Priority: Major
> Labels: pull-request-available
>
> Currently when S3 region nor endpoint is set, the default region is set to
> us-east-2 with cross region access enabled. But when region or endpoint is
> set, cross region access is not enabled.
> The proposal here is to carves out cross region access as a separate config
> and enable/disable it irrespective of region/endpoint is set. This gives more
> flexibility to the user.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]