HADOOP-11939. Deprecate DistCpV1 and Logalyzer. Contributed by Brahma Reddy Battula.

This commit is contained in:
Akira Ajisaka 2015-05-18 16:13:16 +09:00
parent cab0dadbd8
commit f5c48238d5
5 changed files with 26 additions and 4 deletions

View File

@ -572,6 +572,9 @@ Release 2.8.0 - UNRELEASED
HADOOP-11960. Enable Azure-Storage Client Side logging. HADOOP-11960. Enable Azure-Storage Client Side logging.
(Dushyanth via cnauroth) (Dushyanth via cnauroth)
HADOOP-11939. Deprecate DistCpV1 and Logalyzer.
(Brahma Reddy Battula via aajisaka)
OPTIMIZATIONS OPTIMIZATIONS
HADOOP-11785. Reduce the number of listStatus operation in distcp HADOOP-11785. Reduce the number of listStatus operation in distcp

View File

@ -81,6 +81,7 @@
* A Map-reduce program to recursively copy directories between * A Map-reduce program to recursively copy directories between
* different file-systems. * different file-systems.
*/ */
@Deprecated
public class DistCpV1 implements Tool { public class DistCpV1 implements Tool {
public static final Log LOG = LogFactory.getLog(DistCpV1.class); public static final Log LOG = LogFactory.getLog(DistCpV1.class);

View File

@ -65,7 +65,7 @@
* <col1, col2> -separator <separator> * <col1, col2> -separator <separator>
* <p> * <p>
*/ */
@Deprecated
public class Logalyzer { public class Logalyzer {
// Constants // Constants
private static Configuration fsConfig = new Configuration(); private static Configuration fsConfig = new Configuration();
@ -194,6 +194,7 @@ public int compare(byte[] b1, int s1, int l1,
* @param archiveDirectory : The directory to store archived logfiles. * @param archiveDirectory : The directory to store archived logfiles.
* @throws IOException * @throws IOException
*/ */
@SuppressWarnings("deprecation")
public void public void
doArchive(String logListURI, String archiveDirectory) doArchive(String logListURI, String archiveDirectory)
throws IOException throws IOException

View File

@ -55,7 +55,7 @@
/** /**
* A JUnit test for copying files recursively. * A JUnit test for copying files recursively.
*/ */
@SuppressWarnings("deprecation")
public class TestCopyFiles extends TestCase { public class TestCopyFiles extends TestCase {
{ {
((Log4JLogger)LogFactory.getLog("org.apache.hadoop.hdfs.StateChange") ((Log4JLogger)LogFactory.getLog("org.apache.hadoop.hdfs.StateChange")
@ -261,6 +261,7 @@ private static void deldir(FileSystem fs, String topdir) throws IOException {
} }
/** copy files from local file system to local file system */ /** copy files from local file system to local file system */
@SuppressWarnings("deprecation")
public void testCopyFromLocalToLocal() throws Exception { public void testCopyFromLocalToLocal() throws Exception {
Configuration conf = new Configuration(); Configuration conf = new Configuration();
FileSystem localfs = FileSystem.get(LOCAL_FS, conf); FileSystem localfs = FileSystem.get(LOCAL_FS, conf);
@ -275,6 +276,7 @@ public void testCopyFromLocalToLocal() throws Exception {
} }
/** copy files from dfs file system to dfs file system */ /** copy files from dfs file system to dfs file system */
@SuppressWarnings("deprecation")
public void testCopyFromDfsToDfs() throws Exception { public void testCopyFromDfsToDfs() throws Exception {
String namenode = null; String namenode = null;
MiniDFSCluster cluster = null; MiniDFSCluster cluster = null;
@ -305,6 +307,7 @@ public void testCopyFromDfsToDfs() throws Exception {
} }
/** copy empty directory on dfs file system */ /** copy empty directory on dfs file system */
@SuppressWarnings("deprecation")
public void testEmptyDir() throws Exception { public void testEmptyDir() throws Exception {
String namenode = null; String namenode = null;
MiniDFSCluster cluster = null; MiniDFSCluster cluster = null;
@ -336,6 +339,7 @@ public void testEmptyDir() throws Exception {
} }
/** copy files from local file system to dfs file system */ /** copy files from local file system to dfs file system */
@SuppressWarnings("deprecation")
public void testCopyFromLocalToDfs() throws Exception { public void testCopyFromLocalToDfs() throws Exception {
MiniDFSCluster cluster = null; MiniDFSCluster cluster = null;
try { try {
@ -364,6 +368,7 @@ public void testCopyFromLocalToDfs() throws Exception {
} }
/** copy files from dfs file system to local file system */ /** copy files from dfs file system to local file system */
@SuppressWarnings("deprecation")
public void testCopyFromDfsToLocal() throws Exception { public void testCopyFromDfsToLocal() throws Exception {
MiniDFSCluster cluster = null; MiniDFSCluster cluster = null;
try { try {
@ -392,6 +397,7 @@ public void testCopyFromDfsToLocal() throws Exception {
} }
} }
@SuppressWarnings("deprecation")
public void testCopyDfsToDfsUpdateOverwrite() throws Exception { public void testCopyDfsToDfsUpdateOverwrite() throws Exception {
MiniDFSCluster cluster = null; MiniDFSCluster cluster = null;
try { try {
@ -452,6 +458,7 @@ public void testCopyDfsToDfsUpdateOverwrite() throws Exception {
} }
} }
@SuppressWarnings("deprecation")
public void testCopyDfsToDfsUpdateWithSkipCRC() throws Exception { public void testCopyDfsToDfsUpdateWithSkipCRC() throws Exception {
MiniDFSCluster cluster = null; MiniDFSCluster cluster = null;
try { try {
@ -526,7 +533,8 @@ public void testCopyDfsToDfsUpdateWithSkipCRC() throws Exception {
if (cluster != null) { cluster.shutdown(); } if (cluster != null) { cluster.shutdown(); }
} }
} }
@SuppressWarnings("deprecation")
public void testCopyDuplication() throws Exception { public void testCopyDuplication() throws Exception {
final FileSystem localfs = FileSystem.get(LOCAL_FS, new Configuration()); final FileSystem localfs = FileSystem.get(LOCAL_FS, new Configuration());
try { try {
@ -550,6 +558,7 @@ public void testCopyDuplication() throws Exception {
} }
} }
@SuppressWarnings("deprecation")
public void testCopySingleFile() throws Exception { public void testCopySingleFile() throws Exception {
FileSystem fs = FileSystem.get(LOCAL_FS, new Configuration()); FileSystem fs = FileSystem.get(LOCAL_FS, new Configuration());
Path root = new Path(TEST_ROOT_DIR+"/srcdat"); Path root = new Path(TEST_ROOT_DIR+"/srcdat");
@ -609,6 +618,7 @@ public void testCopySingleFile() throws Exception {
} }
/** tests basedir option copying files from dfs file system to dfs file system */ /** tests basedir option copying files from dfs file system to dfs file system */
@SuppressWarnings("deprecation")
public void testBasedir() throws Exception { public void testBasedir() throws Exception {
String namenode = null; String namenode = null;
MiniDFSCluster cluster = null; MiniDFSCluster cluster = null;
@ -634,7 +644,8 @@ public void testBasedir() throws Exception {
if (cluster != null) { cluster.shutdown(); } if (cluster != null) { cluster.shutdown(); }
} }
} }
@SuppressWarnings("deprecation")
public void testPreserveOption() throws Exception { public void testPreserveOption() throws Exception {
Configuration conf = new Configuration(); Configuration conf = new Configuration();
MiniDFSCluster cluster = null; MiniDFSCluster cluster = null;
@ -733,6 +744,7 @@ public void testPreserveOption() throws Exception {
} }
} }
@SuppressWarnings("deprecation")
public void testMapCount() throws Exception { public void testMapCount() throws Exception {
String namenode = null; String namenode = null;
MiniDFSCluster dfs = null; MiniDFSCluster dfs = null;
@ -787,6 +799,7 @@ public void testMapCount() throws Exception {
} }
} }
@SuppressWarnings("deprecation")
public void testLimits() throws Exception { public void testLimits() throws Exception {
Configuration conf = new Configuration(); Configuration conf = new Configuration();
MiniDFSCluster cluster = null; MiniDFSCluster cluster = null;
@ -892,6 +905,7 @@ static Path createHomeDirectory(FileSystem fs, UserGroupInformation ugi
} }
/** test -delete */ /** test -delete */
@SuppressWarnings("deprecation")
public void testDelete() throws Exception { public void testDelete() throws Exception {
final Configuration conf = new Configuration(); final Configuration conf = new Configuration();
conf.setInt("fs.trash.interval", 60); conf.setInt("fs.trash.interval", 60);
@ -964,6 +978,7 @@ public void testDelete() throws Exception {
/** /**
* verify that -delete option works for other {@link FileSystem} * verify that -delete option works for other {@link FileSystem}
* implementations. See MAPREDUCE-1285 */ * implementations. See MAPREDUCE-1285 */
@SuppressWarnings("deprecation")
public void testDeleteLocal() throws Exception { public void testDeleteLocal() throws Exception {
MiniDFSCluster cluster = null; MiniDFSCluster cluster = null;
try { try {
@ -997,6 +1012,7 @@ public void testDeleteLocal() throws Exception {
} }
/** test globbing */ /** test globbing */
@SuppressWarnings("deprecation")
public void testGlobbing() throws Exception { public void testGlobbing() throws Exception {
String namenode = null; String namenode = null;
MiniDFSCluster cluster = null; MiniDFSCluster cluster = null;

View File

@ -44,6 +44,7 @@ public class TestLogalyzer {
+ File.separator + "out"); + File.separator + "out");
@Test @Test
@SuppressWarnings("deprecation")
public void testLogalyzer() throws Exception { public void testLogalyzer() throws Exception {
Path f = createLogFile(); Path f = createLogFile();