From 74851537dee0082824c7e1e0c924a9581b1c62e3 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Eagles Date: Mon, 2 Dec 2013 19:04:51 +0000 Subject: [PATCH] MAPREDUCE-5640. Rename TestLineRecordReader in jobclient module (Jason Lowe via jeagles) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1547149 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ ...rdReader.java => TestLineRecordReaderJobs.java} | 14 ++++++-------- ...rdReader.java => TestLineRecordReaderJobs.java} | 12 ++++++------ 3 files changed, 15 insertions(+), 14 deletions(-) rename hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/{TestLineRecordReader.java => TestLineRecordReaderJobs.java} (92%) rename hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/{TestLineRecordReader.java => TestLineRecordReaderJobs.java} (94%) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 8c785269c6..1c2509584a 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -1512,6 +1512,9 @@ Release 0.23.10 - UNRELEASED IMPROVEMENTS + MAPREDUCE-5640. Rename TestLineRecordReader in jobclient module (Jason Lowe + via jeagles) + OPTIMIZATIONS MAPREDUCE-1981. Improve getSplits performance by using listLocatedStatus diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestLineRecordReader.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestLineRecordReaderJobs.java similarity index 92% rename from hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestLineRecordReader.java rename to hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestLineRecordReaderJobs.java index 69253f4dbd..c25b2b7c26 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestLineRecordReader.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestLineRecordReaderJobs.java @@ -17,22 +17,20 @@ package org.apache.hadoop.mapred; +import static org.junit.Assert.assertEquals; + import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; -import junit.framework.TestCase; - import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; -import org.apache.hadoop.mapred.Mapper; -import org.apache.hadoop.mapred.Reducer; import org.apache.hadoop.mapred.lib.IdentityMapper; import org.apache.hadoop.mapred.lib.IdentityReducer; import org.junit.Test; -public class TestLineRecordReader extends TestCase { +public class TestLineRecordReaderJobs { private static Path workDir = new Path(new Path(System.getProperty( "test.build.data", "."), "data"), "TestTextInputFormat"); @@ -77,7 +75,7 @@ public String readOutputFile(Configuration conf) throws IOException { public void createAndRunJob(Configuration conf) throws IOException, InterruptedException, ClassNotFoundException { JobConf job = new JobConf(conf); - job.setJarByClass(TestLineRecordReader.class); + job.setJarByClass(TestLineRecordReaderJobs.class); job.setMapperClass(IdentityMapper.class); job.setReducerClass(IdentityReducer.class); FileInputFormat.addInputPath(job, inputDir); @@ -106,7 +104,7 @@ public void testCustomRecordDelimiters() throws IOException, createInputFile(conf); createAndRunJob(conf); String expected = "0\tabc\ndef\n9\tghi\njkl\n"; - this.assertEquals(expected, readOutputFile(conf)); + assertEquals(expected, readOutputFile(conf)); } /** @@ -128,7 +126,7 @@ public void testDefaultRecordDelimiters() throws IOException, createInputFile(conf); createAndRunJob(conf); String expected = "0\tabc\n4\tdef\t\n9\tghi\n13\tjkl\n"; - this.assertEquals(expected, readOutputFile(conf)); + assertEquals(expected, readOutputFile(conf)); } } \ No newline at end of file diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestLineRecordReader.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestLineRecordReaderJobs.java similarity index 94% rename from hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestLineRecordReader.java rename to hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestLineRecordReaderJobs.java index dd51ab3907..cc59bef29a 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestLineRecordReader.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestLineRecordReaderJobs.java @@ -18,12 +18,12 @@ package org.apache.hadoop.mapreduce.lib.input; +import static org.junit.Assert.assertEquals; + import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; -import junit.framework.TestCase; - import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; @@ -34,7 +34,7 @@ import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.junit.Test; -public class TestLineRecordReader extends TestCase { +public class TestLineRecordReaderJobs { private static Path workDir = new Path(new Path(System.getProperty( "test.build.data", "."), "data"), "TestTextInputFormat"); @@ -79,7 +79,7 @@ public String readOutputFile(Configuration conf) throws IOException { public void createAndRunJob(Configuration conf) throws IOException, InterruptedException, ClassNotFoundException { Job job = Job.getInstance(conf); - job.setJarByClass(TestLineRecordReader.class); + job.setJarByClass(TestLineRecordReaderJobs.class); job.setMapperClass(Mapper.class); job.setReducerClass(Reducer.class); FileInputFormat.addInputPath(job, inputDir); @@ -107,7 +107,7 @@ public void testCustomRecordDelimiters() throws IOException, createInputFile(conf); createAndRunJob(conf); String expected = "0\tabc\ndef\n9\tghi\njkl\n"; - this.assertEquals(expected, readOutputFile(conf)); + assertEquals(expected, readOutputFile(conf)); } /** @@ -129,7 +129,7 @@ public void testDefaultRecordDelimiters() throws IOException, createInputFile(conf); createAndRunJob(conf); String expected = "0\tabc\n4\tdef\t\n9\tghi\n13\tjkl\n"; - this.assertEquals(expected, readOutputFile(conf)); + assertEquals(expected, readOutputFile(conf)); } }