File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
hadoop-tools/hadoop-aws/src
main/java/org/apache/hadoop/fs/s3a
test/java/org/apache/hadoop/fs/s3a Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -271,8 +271,10 @@ protected ClientOverrideConfiguration.Builder createClientOverrideConfiguration(
271271 * <li>If endpoint is configured via via fs.s3a.endpoint, set it.
272272 * If no region is configured, try to parse region from endpoint. </li>
273273 * <li> If no region is configured, and it could not be parsed from the endpoint,
274- * set the default region as US_EAST_2 and enable cross region access. </li>
274+ * set the default region as US_EAST_2</li>
275275 * <li> If configured region is empty, fallback to SDK resolution chain. </li>
276+ * <li> S3 cross region is enabled by default irrespective of region or endpoint
277+ * is set or not.</li>
276278 * </ol>
277279 *
278280 * @param builder S3 client builder.
Original file line number Diff line number Diff line change @@ -356,6 +356,10 @@ public void testWithOutCrossRegionAccess() throws Exception {
356356 // skip the test if the region is sa-east-1
357357 skipCrossRegionTest ();
358358 final Configuration newConf = new Configuration (getConfiguration ());
359+ removeBaseAndBucketOverrides (newConf ,
360+ ENDPOINT ,
361+ AWS_S3_CROSS_REGION_ACCESS_ENABLED ,
362+ AWS_REGION );
359363 // disable cross region access
360364 newConf .setBoolean (AWS_S3_CROSS_REGION_ACCESS_ENABLED , false );
361365 newConf .set (AWS_REGION , SA_EAST_1 );
@@ -374,6 +378,7 @@ public void testWithCrossRegionAccess() throws Exception {
374378 skipCrossRegionTest ();
375379 final Configuration newConf = new Configuration (getConfiguration ());
376380 removeBaseAndBucketOverrides (newConf ,
381+ ENDPOINT ,
377382 AWS_S3_CROSS_REGION_ACCESS_ENABLED ,
378383 AWS_REGION );
379384 // enable cross region access
You can’t perform that action at this time.
0 commit comments