Skip to content

Commit d3cc405

Browse files
committed
update default region
1 parent 1140f0e commit d3cc405

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/Constants.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,6 +1176,12 @@ private Constants() {
11761176
*/
11771177
public static final String AWS_S3_CENTRAL_REGION = "us-east-1";
11781178

1179+
/**
1180+
* The default region to be used for S3 with cross region access enabled.
1181+
* Value {@value}.
1182+
*/
1183+
public static final String AWS_S3_DEFAULT_REGION = "us-east-2";
1184+
11791185
/**
11801186
* Require that all S3 access is made through Access Points.
11811187
*/

hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/DefaultS3ClientFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
import org.apache.hadoop.fs.store.LogExactlyOnce;
5151

5252
import static org.apache.hadoop.fs.s3a.Constants.AWS_REGION;
53-
import static org.apache.hadoop.fs.s3a.Constants.AWS_S3_CENTRAL_REGION;
53+
import static org.apache.hadoop.fs.s3a.Constants.AWS_S3_DEFAULT_REGION;
5454
import static org.apache.hadoop.fs.s3a.Constants.CENTRAL_ENDPOINT;
5555
import static org.apache.hadoop.fs.s3a.impl.AWSHeaders.REQUESTER_PAYS_HEADER;
5656
import static org.apache.hadoop.fs.s3a.Constants.DEFAULT_SECURE_CONNECTIONS;
@@ -282,7 +282,7 @@ private static Region getS3RegionFromEndpoint(String endpoint) {
282282
* @return the S3 region
283283
*/
284284
private static Region getS3Region(Configuration conf) {
285-
String region = conf.getTrimmed(AWS_REGION, AWS_S3_CENTRAL_REGION);
285+
String region = conf.getTrimmed(AWS_REGION, AWS_S3_DEFAULT_REGION);
286286
LOG.debug("fs.s3a.endpoint.region=\"{}\"", region);
287287
if (!region.isEmpty()) {
288288
// there's either an explicit region or we have fallen back

0 commit comments

Comments
 (0)