From 19f0f9608e31203523943f008ac701b6f3d7973c Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Fri, 22 Apr 2016 11:24:24 +0100 Subject: [PATCH] HADOOP-12891. S3AFileSystem should configure Multipart Copy threshold and chunk size. (Andrew Olson via stevel) --- .../hadoop-common/src/main/resources/core-default.xml | 5 ++++- .../main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java | 2 ++ .../hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml index ac8bc5a461..b4f11e72bb 100644 --- a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml +++ b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml @@ -867,7 +867,10 @@ fs.s3a.multipart.threshold 2147483647 - Threshold before uploads or copies use parallel multipart operations. + How big (in bytes) to split upload or copy operations up into. + This also controls the partition size in renamed files, as rename() involves + copying the source file(s) + diff --git a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java index 97092ac03d..87397984f9 100644 --- a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java +++ b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java @@ -260,6 +260,8 @@ private void initTransferManager() { TransferManagerConfiguration transferConfiguration = new TransferManagerConfiguration(); transferConfiguration.setMinimumUploadPartSize(partSize); transferConfiguration.setMultipartUploadThreshold(multiPartThreshold); + transferConfiguration.setMultipartCopyPartSize(partSize); + transferConfiguration.setMultipartCopyThreshold(multiPartThreshold); transfers = new TransferManager(s3, threadPoolExecutor); transfers.setConfiguration(transferConfiguration); diff --git a/hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md b/hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md index e87b8849ff..2dae7d7ff1 100644 --- a/hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md +++ b/hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md @@ -312,7 +312,9 @@ this capability. fs.s3a.multipart.size 104857600 - How big (in bytes) to split upload or copy operations up into. + How big (in bytes) to split upload or copy operations up into. + This also controls the partition size in renamed files, as rename() involves + copying the source file(s)