Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,7 @@ private void bindAWSClient(URI name, boolean dtEnabled) throws IOException {
S3ClientFactory.S3ClientCreationParameters parameters = null;
parameters = new S3ClientFactory.S3ClientCreationParameters()
.withCredentialSet(credentials)
.withPathUri(name)
.withEndpoint(endpoint)
.withMetrics(statisticsContext.newStatisticsFromAwsSdk())
.withPathStyleAccess(conf.getBoolean(PATH_STYLE_ACCESS, false))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ 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.
Expand Down Expand Up @@ -264,5 +270,26 @@ public S3ClientCreationParameters withHeader(
public Map<String, String> getHeaders() {
return headers;
}

/**
* Get the full s3 path.
* added in HADOOP-18330
* @return path URI
*/
public URI getPathUri() {
return pathUri;
}

/**
* Set full s3a path.
* added in HADOOP-18330
* @param value new value
* @return the builder
*/
public S3ClientCreationParameters withPathUri(
final URI value) {
pathUri = value;
return this;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ private AmazonS3 createS3Client(Configuration conf,
S3ClientFactory.S3ClientCreationParameters parameters
= new S3ClientFactory.S3ClientCreationParameters()
.withCredentialSet(new AnonymousAWSCredentialsProvider())
.withPathUri(new URI("s3a://localhost/"))
.withEndpoint(endpoint)
.withMetrics(new EmptyS3AStatisticsContext()
.newStatisticsFromAwsSdk());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ protected ObjectMetadata readLandsatMetadata(final S3AFileSystem delegatedFS)
S3ClientFactory.S3ClientCreationParameters parameters = null;
parameters = new S3ClientFactory.S3ClientCreationParameters()
.withCredentialSet(testingCreds)
.withPathUri(new URI("s3a://localhost/"))
.withEndpoint(DEFAULT_ENDPOINT)
.withMetrics(new EmptyS3AStatisticsContext()
.newStatisticsFromAwsSdk())
Expand Down