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

Contributed by Yuanbo Liu

(cherry picked from commit 20878d052cebc715c2494a97362fdff08885a77f)
This commit is contained in:
Steve Loughran 2017-03-23 12:54:54 +00:00
parent 59d69257a8
commit a5a4867f3b
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 @@ private void putObject() throws IOException {
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

@ -1870,7 +1870,7 @@ protected void setOptionalCopyObjectRequestParameters(
}
}
protected void setOptionalPutRequestParameters(PutObjectRequest request) {
private void setOptionalPutRequestParameters(PutObjectRequest request) {
switch (serverSideEncryptionAlgorithm) {
case SSE_KMS:
request.setSSEAwsKeyManagementParams(generateSSEAwsKeyParams());