You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aa...@apache.org on 2015/05/18 09:15:09 UTC
[1/2] hadoop git commit: HADOOP-11939. Deprecate DistCpV1 and
Logalyzer. Contributed by Brahma Reddy Battula.
Repository: hadoop
Updated Branches:
refs/heads/branch-2 343effa2c -> b26d99c39
refs/heads/trunk cab0dadbd -> f5c48238d
HADOOP-11939. Deprecate DistCpV1 and Logalyzer. Contributed by Brahma Reddy Battula.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f5c48238
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f5c48238
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f5c48238
Branch: refs/heads/trunk
Commit: f5c48238d5eb0c1d2b876f390ac6c35221efcb54
Parents: cab0dad
Author: Akira Ajisaka <aa...@apache.org>
Authored: Mon May 18 16:13:16 2015 +0900
Committer: Akira Ajisaka <aa...@apache.org>
Committed: Mon May 18 16:13:16 2015 +0900
----------------------------------------------------------------------
hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++
.../java/org/apache/hadoop/tools/DistCpV1.java | 1 +
.../java/org/apache/hadoop/tools/Logalyzer.java | 3 ++-
.../org/apache/hadoop/tools/TestCopyFiles.java | 22 +++++++++++++++++---
.../org/apache/hadoop/tools/TestLogalyzer.java | 1 +
5 files changed, 26 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/f5c48238/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 5666035..7349091 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -572,6 +572,9 @@ Release 2.8.0 - UNRELEASED
HADOOP-11960. Enable Azure-Storage Client Side logging.
(Dushyanth via cnauroth)
+ HADOOP-11939. Deprecate DistCpV1 and Logalyzer.
+ (Brahma Reddy Battula via aajisaka)
+
OPTIMIZATIONS
HADOOP-11785. Reduce the number of listStatus operation in distcp
http://git-wip-us.apache.org/repos/asf/hadoop/blob/f5c48238/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/DistCpV1.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/DistCpV1.java b/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/DistCpV1.java
index 8a6819b..39ac5c3 100644
--- a/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/DistCpV1.java
+++ b/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/DistCpV1.java
@@ -81,6 +81,7 @@ import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
* A Map-reduce program to recursively copy directories between
* different file-systems.
*/
+@Deprecated
public class DistCpV1 implements Tool {
public static final Log LOG = LogFactory.getLog(DistCpV1.class);
http://git-wip-us.apache.org/repos/asf/hadoop/blob/f5c48238/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java b/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java
index 449ecbf..05e6e24 100644
--- a/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java
+++ b/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java
@@ -65,7 +65,7 @@ import org.apache.hadoop.mapreduce.lib.map.RegexMapper;
* <col1, col2> -separator <separator>
* <p>
*/
-
+@Deprecated
public class Logalyzer {
// Constants
private static Configuration fsConfig = new Configuration();
@@ -194,6 +194,7 @@ public class Logalyzer {
* @param archiveDirectory : The directory to store archived logfiles.
* @throws IOException
*/
+ @SuppressWarnings("deprecation")
public void
doArchive(String logListURI, String archiveDirectory)
throws IOException
http://git-wip-us.apache.org/repos/asf/hadoop/blob/f5c48238/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java b/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
index 73bba66..20b8ee2 100644
--- a/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
+++ b/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
@@ -55,7 +55,7 @@ import org.apache.log4j.Level;
/**
* A JUnit test for copying files recursively.
*/
-
+@SuppressWarnings("deprecation")
public class TestCopyFiles extends TestCase {
{
((Log4JLogger)LogFactory.getLog("org.apache.hadoop.hdfs.StateChange")
@@ -261,6 +261,7 @@ public class TestCopyFiles extends TestCase {
}
/** copy files from local file system to local file system */
+ @SuppressWarnings("deprecation")
public void testCopyFromLocalToLocal() throws Exception {
Configuration conf = new Configuration();
FileSystem localfs = FileSystem.get(LOCAL_FS, conf);
@@ -275,6 +276,7 @@ public class TestCopyFiles extends TestCase {
}
/** copy files from dfs file system to dfs file system */
+ @SuppressWarnings("deprecation")
public void testCopyFromDfsToDfs() throws Exception {
String namenode = null;
MiniDFSCluster cluster = null;
@@ -305,6 +307,7 @@ public class TestCopyFiles extends TestCase {
}
/** copy empty directory on dfs file system */
+ @SuppressWarnings("deprecation")
public void testEmptyDir() throws Exception {
String namenode = null;
MiniDFSCluster cluster = null;
@@ -336,6 +339,7 @@ public class TestCopyFiles extends TestCase {
}
/** copy files from local file system to dfs file system */
+ @SuppressWarnings("deprecation")
public void testCopyFromLocalToDfs() throws Exception {
MiniDFSCluster cluster = null;
try {
@@ -364,6 +368,7 @@ public class TestCopyFiles extends TestCase {
}
/** copy files from dfs file system to local file system */
+ @SuppressWarnings("deprecation")
public void testCopyFromDfsToLocal() throws Exception {
MiniDFSCluster cluster = null;
try {
@@ -392,6 +397,7 @@ public class TestCopyFiles extends TestCase {
}
}
+ @SuppressWarnings("deprecation")
public void testCopyDfsToDfsUpdateOverwrite() throws Exception {
MiniDFSCluster cluster = null;
try {
@@ -452,6 +458,7 @@ public class TestCopyFiles extends TestCase {
}
}
+ @SuppressWarnings("deprecation")
public void testCopyDfsToDfsUpdateWithSkipCRC() throws Exception {
MiniDFSCluster cluster = null;
try {
@@ -526,7 +533,8 @@ public class TestCopyFiles extends TestCase {
if (cluster != null) { cluster.shutdown(); }
}
}
-
+
+ @SuppressWarnings("deprecation")
public void testCopyDuplication() throws Exception {
final FileSystem localfs = FileSystem.get(LOCAL_FS, new Configuration());
try {
@@ -550,6 +558,7 @@ public class TestCopyFiles extends TestCase {
}
}
+ @SuppressWarnings("deprecation")
public void testCopySingleFile() throws Exception {
FileSystem fs = FileSystem.get(LOCAL_FS, new Configuration());
Path root = new Path(TEST_ROOT_DIR+"/srcdat");
@@ -609,6 +618,7 @@ public class TestCopyFiles extends TestCase {
}
/** tests basedir option copying files from dfs file system to dfs file system */
+ @SuppressWarnings("deprecation")
public void testBasedir() throws Exception {
String namenode = null;
MiniDFSCluster cluster = null;
@@ -634,7 +644,8 @@ public class TestCopyFiles extends TestCase {
if (cluster != null) { cluster.shutdown(); }
}
}
-
+
+ @SuppressWarnings("deprecation")
public void testPreserveOption() throws Exception {
Configuration conf = new Configuration();
MiniDFSCluster cluster = null;
@@ -733,6 +744,7 @@ public class TestCopyFiles extends TestCase {
}
}
+ @SuppressWarnings("deprecation")
public void testMapCount() throws Exception {
String namenode = null;
MiniDFSCluster dfs = null;
@@ -787,6 +799,7 @@ public class TestCopyFiles extends TestCase {
}
}
+ @SuppressWarnings("deprecation")
public void testLimits() throws Exception {
Configuration conf = new Configuration();
MiniDFSCluster cluster = null;
@@ -892,6 +905,7 @@ public class TestCopyFiles extends TestCase {
}
/** test -delete */
+ @SuppressWarnings("deprecation")
public void testDelete() throws Exception {
final Configuration conf = new Configuration();
conf.setInt("fs.trash.interval", 60);
@@ -964,6 +978,7 @@ public class TestCopyFiles extends TestCase {
/**
* verify that -delete option works for other {@link FileSystem}
* implementations. See MAPREDUCE-1285 */
+ @SuppressWarnings("deprecation")
public void testDeleteLocal() throws Exception {
MiniDFSCluster cluster = null;
try {
@@ -997,6 +1012,7 @@ public class TestCopyFiles extends TestCase {
}
/** test globbing */
+ @SuppressWarnings("deprecation")
public void testGlobbing() throws Exception {
String namenode = null;
MiniDFSCluster cluster = null;
http://git-wip-us.apache.org/repos/asf/hadoop/blob/f5c48238/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestLogalyzer.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestLogalyzer.java b/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestLogalyzer.java
index 2042604..3787f6c 100644
--- a/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestLogalyzer.java
+++ b/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestLogalyzer.java
@@ -44,6 +44,7 @@ public class TestLogalyzer {
+ File.separator + "out");
@Test
+ @SuppressWarnings("deprecation")
public void testLogalyzer() throws Exception {
Path f = createLogFile();
[2/2] hadoop git commit: HADOOP-11939. Deprecate DistCpV1 and
Logalyzer. Contributed by Brahma Reddy Battula.
Posted by aa...@apache.org.
HADOOP-11939. Deprecate DistCpV1 and Logalyzer. Contributed by Brahma Reddy Battula.
(cherry picked from commit f5c48238d5eb0c1d2b876f390ac6c35221efcb54)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b26d99c3
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b26d99c3
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b26d99c3
Branch: refs/heads/branch-2
Commit: b26d99c39415e6f485d0eac15b72adf5b2c2ef12
Parents: 343effa
Author: Akira Ajisaka <aa...@apache.org>
Authored: Mon May 18 16:13:16 2015 +0900
Committer: Akira Ajisaka <aa...@apache.org>
Committed: Mon May 18 16:14:19 2015 +0900
----------------------------------------------------------------------
hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++
.../java/org/apache/hadoop/tools/DistCpV1.java | 1 +
.../java/org/apache/hadoop/tools/Logalyzer.java | 3 ++-
.../org/apache/hadoop/tools/TestCopyFiles.java | 22 +++++++++++++++++---
.../org/apache/hadoop/tools/TestLogalyzer.java | 1 +
5 files changed, 26 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/b26d99c3/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 8365f0c..8a03675 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -101,6 +101,9 @@ Release 2.8.0 - UNRELEASED
HADOOP-11960. Enable Azure-Storage Client Side logging.
(Dushyanth via cnauroth)
+ HADOOP-11939. Deprecate DistCpV1 and Logalyzer.
+ (Brahma Reddy Battula via aajisaka)
+
OPTIMIZATIONS
HADOOP-11785. Reduce the number of listStatus operation in distcp
http://git-wip-us.apache.org/repos/asf/hadoop/blob/b26d99c3/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/DistCpV1.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/DistCpV1.java b/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/DistCpV1.java
index 8a6819b..39ac5c3 100644
--- a/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/DistCpV1.java
+++ b/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/DistCpV1.java
@@ -81,6 +81,7 @@ import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
* A Map-reduce program to recursively copy directories between
* different file-systems.
*/
+@Deprecated
public class DistCpV1 implements Tool {
public static final Log LOG = LogFactory.getLog(DistCpV1.class);
http://git-wip-us.apache.org/repos/asf/hadoop/blob/b26d99c3/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java b/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java
index 449ecbf..05e6e24 100644
--- a/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java
+++ b/hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/tools/Logalyzer.java
@@ -65,7 +65,7 @@ import org.apache.hadoop.mapreduce.lib.map.RegexMapper;
* <col1, col2> -separator <separator>
* <p>
*/
-
+@Deprecated
public class Logalyzer {
// Constants
private static Configuration fsConfig = new Configuration();
@@ -194,6 +194,7 @@ public class Logalyzer {
* @param archiveDirectory : The directory to store archived logfiles.
* @throws IOException
*/
+ @SuppressWarnings("deprecation")
public void
doArchive(String logListURI, String archiveDirectory)
throws IOException
http://git-wip-us.apache.org/repos/asf/hadoop/blob/b26d99c3/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java b/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
index ca7f36f..16ca0be 100644
--- a/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
+++ b/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestCopyFiles.java
@@ -55,7 +55,7 @@ import org.apache.log4j.Level;
/**
* A JUnit test for copying files recursively.
*/
-
+@SuppressWarnings("deprecation")
public class TestCopyFiles extends TestCase {
{
((Log4JLogger)LogFactory.getLog("org.apache.hadoop.hdfs.StateChange")
@@ -261,6 +261,7 @@ public class TestCopyFiles extends TestCase {
}
/** copy files from local file system to local file system */
+ @SuppressWarnings("deprecation")
public void testCopyFromLocalToLocal() throws Exception {
Configuration conf = new Configuration();
FileSystem localfs = FileSystem.get(LOCAL_FS, conf);
@@ -275,6 +276,7 @@ public class TestCopyFiles extends TestCase {
}
/** copy files from dfs file system to dfs file system */
+ @SuppressWarnings("deprecation")
public void testCopyFromDfsToDfs() throws Exception {
String namenode = null;
MiniDFSCluster cluster = null;
@@ -305,6 +307,7 @@ public class TestCopyFiles extends TestCase {
}
/** copy empty directory on dfs file system */
+ @SuppressWarnings("deprecation")
public void testEmptyDir() throws Exception {
String namenode = null;
MiniDFSCluster cluster = null;
@@ -336,6 +339,7 @@ public class TestCopyFiles extends TestCase {
}
/** copy files from local file system to dfs file system */
+ @SuppressWarnings("deprecation")
public void testCopyFromLocalToDfs() throws Exception {
MiniDFSCluster cluster = null;
try {
@@ -364,6 +368,7 @@ public class TestCopyFiles extends TestCase {
}
/** copy files from dfs file system to local file system */
+ @SuppressWarnings("deprecation")
public void testCopyFromDfsToLocal() throws Exception {
MiniDFSCluster cluster = null;
try {
@@ -392,6 +397,7 @@ public class TestCopyFiles extends TestCase {
}
}
+ @SuppressWarnings("deprecation")
public void testCopyDfsToDfsUpdateOverwrite() throws Exception {
MiniDFSCluster cluster = null;
try {
@@ -452,6 +458,7 @@ public class TestCopyFiles extends TestCase {
}
}
+ @SuppressWarnings("deprecation")
public void testCopyDfsToDfsUpdateWithSkipCRC() throws Exception {
MiniDFSCluster cluster = null;
try {
@@ -526,7 +533,8 @@ public class TestCopyFiles extends TestCase {
if (cluster != null) { cluster.shutdown(); }
}
}
-
+
+ @SuppressWarnings("deprecation")
public void testCopyDuplication() throws Exception {
final FileSystem localfs = FileSystem.get(LOCAL_FS, new Configuration());
try {
@@ -550,6 +558,7 @@ public class TestCopyFiles extends TestCase {
}
}
+ @SuppressWarnings("deprecation")
public void testCopySingleFile() throws Exception {
FileSystem fs = FileSystem.get(LOCAL_FS, new Configuration());
Path root = new Path(TEST_ROOT_DIR+"/srcdat");
@@ -609,6 +618,7 @@ public class TestCopyFiles extends TestCase {
}
/** tests basedir option copying files from dfs file system to dfs file system */
+ @SuppressWarnings("deprecation")
public void testBasedir() throws Exception {
String namenode = null;
MiniDFSCluster cluster = null;
@@ -634,7 +644,8 @@ public class TestCopyFiles extends TestCase {
if (cluster != null) { cluster.shutdown(); }
}
}
-
+
+ @SuppressWarnings("deprecation")
public void testPreserveOption() throws Exception {
Configuration conf = new Configuration();
MiniDFSCluster cluster = null;
@@ -733,6 +744,7 @@ public class TestCopyFiles extends TestCase {
}
}
+ @SuppressWarnings("deprecation")
public void testMapCount() throws Exception {
String namenode = null;
MiniDFSCluster dfs = null;
@@ -787,6 +799,7 @@ public class TestCopyFiles extends TestCase {
}
}
+ @SuppressWarnings("deprecation")
public void testLimits() throws Exception {
Configuration conf = new Configuration();
MiniDFSCluster cluster = null;
@@ -950,6 +963,7 @@ public class TestCopyFiles extends TestCase {
}
/** test -delete */
+ @SuppressWarnings("deprecation")
public void testDelete() throws Exception {
final Configuration conf = new Configuration();
conf.setInt("fs.trash.interval", 60);
@@ -1022,6 +1036,7 @@ public class TestCopyFiles extends TestCase {
/**
* verify that -delete option works for other {@link FileSystem}
* implementations. See MAPREDUCE-1285 */
+ @SuppressWarnings("deprecation")
public void testDeleteLocal() throws Exception {
MiniDFSCluster cluster = null;
try {
@@ -1055,6 +1070,7 @@ public class TestCopyFiles extends TestCase {
}
/** test globbing */
+ @SuppressWarnings("deprecation")
public void testGlobbing() throws Exception {
String namenode = null;
MiniDFSCluster cluster = null;
http://git-wip-us.apache.org/repos/asf/hadoop/blob/b26d99c3/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestLogalyzer.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestLogalyzer.java b/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestLogalyzer.java
index 2042604..3787f6c 100644
--- a/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestLogalyzer.java
+++ b/hadoop-tools/hadoop-extras/src/test/java/org/apache/hadoop/tools/TestLogalyzer.java
@@ -44,6 +44,7 @@ public class TestLogalyzer {
+ File.separator + "out");
@Test
+ @SuppressWarnings("deprecation")
public void testLogalyzer() throws Exception {
Path f = createLogFile();