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.



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