From d060cbea48ffc75da0f4fa98c3ea5203d6db1360 Mon Sep 17 00:00:00 2001 From: Sunil G Date: Mon, 24 Sep 2018 21:19:47 +0530 Subject: [PATCH] HDFS-13937. Multipart Uploader APIs to be marked as private/unstable in 3.2.0. Contributed by Steve Loughran. --- .../src/main/java/org/apache/hadoop/fs/BBPartHandle.java | 5 +++++ .../src/main/java/org/apache/hadoop/fs/BBUploadHandle.java | 5 +++++ .../org/apache/hadoop/fs/FileSystemMultipartUploader.java | 4 ++++ .../main/java/org/apache/hadoop/fs/MultipartUploader.java | 5 +++++ .../java/org/apache/hadoop/fs/MultipartUploaderFactory.java | 4 ++++ .../java/org/apache/hadoop/fs/s3a/S3AMultipartUploader.java | 4 ++++ 6 files changed, 27 insertions(+) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BBPartHandle.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BBPartHandle.java index e1336b8085..9df45a9a39 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BBPartHandle.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BBPartHandle.java @@ -19,9 +19,14 @@ import java.nio.ByteBuffer; import java.util.Arrays; +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; + /** * Byte array backed part handle. */ +@InterfaceAudience.Private +@InterfaceStability.Unstable public final class BBPartHandle implements PartHandle { private static final long serialVersionUID = 0x23ce3eb1; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BBUploadHandle.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BBUploadHandle.java index 6430c145e2..0d35bce6a2 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BBUploadHandle.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BBUploadHandle.java @@ -19,9 +19,14 @@ import java.nio.ByteBuffer; import java.util.Arrays; +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; + /** * Byte array backed upload handle. */ +@InterfaceAudience.Private +@InterfaceStability.Unstable public final class BBUploadHandle implements UploadHandle { private static final long serialVersionUID = 0x69d5509b; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystemMultipartUploader.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystemMultipartUploader.java index f13b50bd20..690194d593 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystemMultipartUploader.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystemMultipartUploader.java @@ -28,6 +28,8 @@ import org.apache.commons.compress.utils.IOUtils; import org.apache.commons.lang3.tuple.Pair; +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.permission.FsPermission; @@ -44,6 +46,8 @@ * and then delete the temp directory. * */ +@InterfaceAudience.Private +@InterfaceStability.Unstable public class FileSystemMultipartUploader extends MultipartUploader { private final FileSystem fs; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MultipartUploader.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MultipartUploader.java index 76f58d3597..b56dbf880f 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MultipartUploader.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MultipartUploader.java @@ -27,6 +27,9 @@ import org.apache.commons.lang3.tuple.Pair; +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; + /** * MultipartUploader is an interface for copying files multipart and across * multiple nodes. Users should: @@ -41,6 +44,8 @@ * that 'complete' will reorder parts if the destination FS doesn't already * do it for them. */ +@InterfaceAudience.Private +@InterfaceStability.Unstable public abstract class MultipartUploader { public static final Logger LOG = LoggerFactory.getLogger(MultipartUploader.class); diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MultipartUploaderFactory.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MultipartUploaderFactory.java index b0fa798ee2..8b3523272f 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MultipartUploaderFactory.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MultipartUploaderFactory.java @@ -16,6 +16,8 @@ */ package org.apache.hadoop.fs; +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.conf.Configuration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -28,6 +30,8 @@ * {@link ServiceLoader}-driven uploader API for storage services supporting * multipart uploads. */ +@InterfaceAudience.Private +@InterfaceStability.Unstable public abstract class MultipartUploaderFactory { public static final Logger LOG = LoggerFactory.getLogger(MultipartUploaderFactory.class); diff --git a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AMultipartUploader.java b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AMultipartUploader.java index 4a6cb8c093..cab4e2a029 100644 --- a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AMultipartUploader.java +++ b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AMultipartUploader.java @@ -38,6 +38,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.BBPartHandle; import org.apache.hadoop.fs.BBUploadHandle; @@ -55,6 +57,8 @@ * MultipartUploader for S3AFileSystem. This uses the S3 multipart * upload mechanism. */ +@InterfaceAudience.Private +@InterfaceStability.Unstable public class S3AMultipartUploader extends MultipartUploader { private final S3AFileSystem s3a;