Revert "HADOOP-18330. S3AFileSystem removes Path when calling createS3Client (#4557)"

(hadn't realised the PR was against 3.3.3)

This reverts commit 1c7b0bc5f47025d305d7654f9bcc06148c62aa7a.
This commit is contained in:
Steve Loughran 2022-07-16 17:53:37 +01:00
parent 1c7b0bc5f4
commit 15621e3415
4 changed files with 0 additions and 30 deletions

View File

@ -888,7 +888,6 @@ private void bindAWSClient(URI name, boolean dtEnabled) throws IOException {
S3ClientFactory.S3ClientCreationParameters parameters = null;
parameters = new S3ClientFactory.S3ClientCreationParameters()
.withCredentialSet(credentials)
.withPath(name)
.withEndpoint(endpoint)
.withMetrics(statisticsContext.newStatisticsFromAwsSdk())
.withPathStyleAccess(conf.getBoolean(PATH_STYLE_ACCESS, false))

View File

@ -115,12 +115,6 @@ final class S3ClientCreationParameters {
*/
private String userAgentSuffix = "";
/**
* S3A path.
* added in HADOOP-18330
*/
private URI pathUri;
/**
* List of request handlers to include in the chain
* of request execution in the SDK.
@ -270,26 +264,5 @@ public S3ClientCreationParameters withHeader(
public Map<String, String> getHeaders() {
return headers;
}
/**
* Get the full s3 path.
* added in HADOOP-18330
* @return path URI
*/
public URI getPath() {
return pathUri;
}
/**
* Set full s3a path.
* added in HADOOP-18330
* @param value new value
* @return the builder
*/
public S3ClientCreationParameters withPath(
final URI value) {
pathUri = value;
return this;
}
}
}

View File

@ -176,7 +176,6 @@ private AmazonS3 createS3Client(Configuration conf,
S3ClientFactory.S3ClientCreationParameters parameters
= new S3ClientFactory.S3ClientCreationParameters()
.withCredentialSet(new AnonymousAWSCredentialsProvider())
.withPath(new URI("s3a://localhost/"))
.withEndpoint(endpoint)
.withMetrics(new EmptyS3AStatisticsContext()
.newStatisticsFromAwsSdk());

View File

@ -590,7 +590,6 @@ protected ObjectMetadata readLandsatMetadata(final S3AFileSystem delegatedFS)
S3ClientFactory.S3ClientCreationParameters parameters = null;
parameters = new S3ClientFactory.S3ClientCreationParameters()
.withCredentialSet(testingCreds)
.withPath(new URI("s3a://localhost/"))
.withEndpoint(DEFAULT_ENDPOINT)
.withMetrics(new EmptyS3AStatisticsContext()
.newStatisticsFromAwsSdk())