From 7887fab815ee16e763916bcd9383ba3c2d9ea165 Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Fri, 1 Apr 2016 13:59:14 +0900 Subject: [PATCH] HADOOP-11661. Deprecate FileUtil#copyMerge. Contributed by Brahma Reddy Battula. (cherry picked from commit a8d8b80a205c78bf0aa65d32a6a83c16d3ea3f0b) (cherry picked from commit 80d122d7fe3b9b6e32f111c7e7accdb5bf436cdd) --- .../src/main/java/org/apache/hadoop/fs/FileUtil.java | 1 + .../src/test/java/org/apache/hadoop/fs/TestFileUtil.java | 1 + 2 files changed, 2 insertions(+) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java index c874aea7287..8ad2cc8eadc 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java @@ -381,6 +381,7 @@ public class FileUtil { } + @Deprecated /** Copy all files in a directory to one output file (merge). */ public static boolean copyMerge(FileSystem srcFS, Path srcDir, FileSystem dstFS, Path dstFile, diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java index 5fc0b2dc2aa..f7464b7fce7 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java @@ -559,6 +559,7 @@ public class TestFileUtil { * @return boolean true if the call to FileUtil.copyMerge was successful. * @throws IOException if an I/O error occurs. */ + @SuppressWarnings("deprecation") private boolean copyMerge(String src, String dst) throws IOException { Configuration conf = new Configuration();