From 4d4fb1723fd825df4ad2488e4ecde0c69359e83a Mon Sep 17 00:00:00 2001 From: Sean Zhong Date: Wed, 6 Aug 2014 07:40:24 +0000 Subject: [PATCH] MAPREDUCE-5978. native-task: remove test case for not supported codec Bzip2Codec and DefaultCodec (Manu Zhang) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/MR-2841@1616116 13f79535-47bb-0310-9956-ffa450edef68 --- .../CHANGES.MAPREDUCE-2841.txt | 3 +- .../nativetask/compresstest/CompressTest.java | 33 ---------------- .../resources/test-bzip2-compress-conf.xml | 39 ------------------- .../resources/test-default-compress-conf.xml | 39 ------------------- 4 files changed, 2 insertions(+), 112 deletions(-) delete mode 100644 hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/test/resources/test-bzip2-compress-conf.xml delete mode 100644 hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/test/resources/test-default-compress-conf.xml diff --git a/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt b/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt index 4b77262caf..462ac8bc2d 100644 --- a/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt +++ b/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt @@ -10,4 +10,5 @@ MAPREDUCE-5991. native-task should not run unit tests if native profile is not e MAPREDUCE-5995. native-task: Revert changes to Text internals (todd) MAPREDUCE-6005. native-task: Fix some valgrind errors (Binglin Chang) MAPREDUCE-5984. native-task: Reuse lz4 sources in hadoop-common (Binglin Chang) -MAPREDUCE-5976. native-task: should not fail to build if snappy is missing (Manu Zhang) \ No newline at end of file +MAPREDUCE-5976. native-task: should not fail to build if snappy is missing (Manu Zhang) +MAPREDUCE-5978. native-task: remove test case for not supported codec Bzip2Codec and DefaultCodec (Manu Zhang) \ No newline at end of file diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/test/java/org/apache/hadoop/mapred/nativetask/compresstest/CompressTest.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/test/java/org/apache/hadoop/mapred/nativetask/compresstest/CompressTest.java index 040637594d..b98e2ded1e 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/test/java/org/apache/hadoop/mapred/nativetask/compresstest/CompressTest.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/test/java/org/apache/hadoop/mapred/nativetask/compresstest/CompressTest.java @@ -67,23 +67,6 @@ public void testGzipCompress() throws Exception { assertEquals("file compare result: if they are the same ,then return true", true, compareRet); } - @Test - public void testBzip2Compress() throws Exception { - final Configuration nativeconf = ScenarioConfiguration.getNativeConfiguration(); - nativeconf.addResource(TestConstants.BZIP2_COMPRESS_CONF_PATH); - final Job nativejob = CompressMapper.getCompressJob("nativebzip2", nativeconf); - nativejob.waitForCompletion(true); - - final Configuration hadoopconf = ScenarioConfiguration.getNormalConfiguration(); - hadoopconf.addResource(TestConstants.BZIP2_COMPRESS_CONF_PATH); - final Job hadoopjob = CompressMapper.getCompressJob("hadoopbzip2", hadoopconf); - hadoopjob.waitForCompletion(true); - - final boolean compareRet = ResultVerifier.verify(CompressMapper.outputFileDir + "nativebzip2", - CompressMapper.outputFileDir + "hadoopbzip2"); - assertEquals("file compare result: if they are the same ,then return true", true, compareRet); - } - @Test public void testLz4Compress() throws Exception { final Configuration nativeConf = ScenarioConfiguration.getNativeConfiguration(); @@ -100,22 +83,6 @@ public void testLz4Compress() throws Exception { assertEquals("file compare result: if they are the same ,then return true", true, compareRet); } - @Test - public void testDefaultCompress() throws Exception { - final Configuration nativeConf = ScenarioConfiguration.getNativeConfiguration(); - nativeConf.addResource(TestConstants.DEFAULT_COMPRESS_CONF_PATH); - final Job nativeJob = CompressMapper.getCompressJob("nativedefault", nativeConf); - nativeJob.waitForCompletion(true); - - final Configuration hadoopConf = ScenarioConfiguration.getNormalConfiguration(); - hadoopConf.addResource(TestConstants.DEFAULT_COMPRESS_CONF_PATH); - final Job hadoopJob = CompressMapper.getCompressJob("hadoopdefault", hadoopConf); - hadoopJob.waitForCompletion(true); - final boolean compareRet = ResultVerifier.verify(CompressMapper.outputFileDir + "nativedefault", - CompressMapper.outputFileDir + "hadoopdefault"); - assertEquals("file compare result: if they are the same ,then return true", true, compareRet); - } - @Before public void startUp() throws Exception { final ScenarioConfiguration conf = new ScenarioConfiguration(); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/test/resources/test-bzip2-compress-conf.xml b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/test/resources/test-bzip2-compress-conf.xml deleted file mode 100644 index 248498402e..0000000000 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/test/resources/test-bzip2-compress-conf.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - -mapred.output.compress -false - - -nativetask.compress.filesize -100000 - - -mapreduce.reduce.class -org.apache.hadoop.mapred.nativetask.kvtest.HashSumReducer - - -mapred.output.value.class -org.apache.hadoop.io.IntWritable - - -mapred.compress.map.output -true - - -mapred.output.compression.type -BLOCK - - -mapred.map.output.compression.codec -org.apache.hadoop.io.compress.BZip2Codec - - -hadoop.native.lib -true - - diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/test/resources/test-default-compress-conf.xml b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/test/resources/test-default-compress-conf.xml deleted file mode 100644 index 765daf173c..0000000000 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/test/resources/test-default-compress-conf.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - -mapred.output.compress -false - - -mapred.output.value.class -org.apache.hadoop.io.IntWritable - - -nativetask.compress.filesize -100000 - - -mapreduce.reduce.class -org.apache.hadoop.mapred.nativetask.kvtest.HashSumReducer - - -mapred.compress.map.output -true - - -mapred.output.compression.type -BLOCK - - -mapred.map.output.compression.codec -org.apache.hadoop.io.compress.DefaultCodec - - -hadoop.native.lib -true - -