HADOOP-14120 needless S3AFileSystem.setOptionalPutRequestParameters in S3ABlockOutputStream putObject().

Contributed by Yuanbo Liu
This commit is contained in:
Steve Loughran 2017-03-23 12:52:22 +00:00
parent f98f4bb6ca
commit 20878d052c
No known key found for this signature in database
GPG Key ID: 950CC3E032B79CA2
2 changed files with 3 additions and 4 deletions

View File

@ -378,9 +378,8 @@ class S3ABlockOutputStream extends OutputStream {
int size = block.dataSize();
final S3ADataBlocks.BlockUploadData uploadData = block.startUpload();
final PutObjectRequest putObjectRequest = uploadData.hasFile() ?
writeOperationHelper.newPutRequest(uploadData.getFile())
: writeOperationHelper.newPutRequest(uploadData.getUploadStream(), size);
fs.setOptionalPutRequestParameters(putObjectRequest);
writeOperationHelper.newPutRequest(uploadData.getFile()) :
writeOperationHelper.newPutRequest(uploadData.getUploadStream(), size);
long transferQueueTime = now();
BlockUploadProgress callback =
new BlockUploadProgress(

View File

@ -1869,7 +1869,7 @@ public class S3AFileSystem extends FileSystem {
}
}
protected void setOptionalPutRequestParameters(PutObjectRequest request) {
private void setOptionalPutRequestParameters(PutObjectRequest request) {
switch (serverSideEncryptionAlgorithm) {
case SSE_KMS:
request.setSSEAwsKeyManagementParams(generateSSEAwsKeyParams());