HADOOP-17305. Fix ITestCustomSigner to work with s3 compatible endpoints (#2395)
Contributed by Mukund Thakur Change-Id: Ia5def405056691c349cf05530fd3172047d2058b
This commit is contained in:
parent
b3e968d21e
commit
4c3324ca1a
|
@ -133,11 +133,7 @@ public class ITestCustomSigner extends AbstractS3ATestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String determineRegion(String bucketName) throws IOException {
|
private String determineRegion(String bucketName) throws IOException {
|
||||||
AmazonS3 s3 = AmazonS3ClientBuilder.standard().withCredentials(
|
String region = getFileSystem().getBucketLocation(bucketName);
|
||||||
new SimpleAWSCredentialsProvider(null, createConfiguration()))
|
|
||||||
.withForceGlobalBucketAccessEnabled(true).withRegion("us-east-1")
|
|
||||||
.build();
|
|
||||||
String region = s3.getBucketLocation(bucketName);
|
|
||||||
return fixBucketRegion(region);
|
return fixBucketRegion(region);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue