You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-commits@hadoop.apache.org by vi...@apache.org on 2014/04/13 21:55:33 UTC
svn commit: r1587089 - in /hadoop/common/trunk/hadoop-mapreduce-project:
CHANGES.txt
hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/jobcontrol/TestMapReduceJobControl.java
Author: vinodkv
Date: Sun Apr 13 19:55:32 2014
New Revision: 1587089
URL: http://svn.apache.org/r1587089
Log:
MAPREDUCE-5828. Fixed a test issue with TestMapReduceJobControl that was causing it to fail on Windows. Contributed by Vinod Kumar Vavilapalli.
Modified:
hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/jobcontrol/TestMapReduceJobControl.java
Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt?rev=1587089&r1=1587088&r2=1587089&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Sun Apr 13 19:55:32 2014
@@ -196,6 +196,9 @@ Release 2.4.1 - UNRELEASED
on Windows for temporary files and thus also fix the test-issue with
TestHistoryServerFileSystemStateStoreService. (Varun Vasudev via vinodkv)
+ MAPREDUCE-5828. Fixed a test issue with TestMapReduceJobControl that was
+ causing it to fail on Windows. (vinodkv)
+
Release 2.4.0 - 2014-04-07
INCOMPATIBLE CHANGES
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/jobcontrol/TestMapReduceJobControl.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/jobcontrol/TestMapReduceJobControl.java?rev=1587089&r1=1587088&r2=1587089&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/jobcontrol/TestMapReduceJobControl.java (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/jobcontrol/TestMapReduceJobControl.java Sun Apr 13 19:55:32 2014
@@ -24,6 +24,8 @@ import java.util.List;
import junit.framework.Assert;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
@@ -38,6 +40,9 @@ import org.junit.Test;
*/
public class TestMapReduceJobControl extends HadoopTestCase {
+ public static final Log LOG =
+ LogFactory.getLog(TestMapReduceJobControl.class.getName());
+
static Path rootDataDir = new Path(
System.getProperty("test.build.data", "."), "TestData");
static Path indir = new Path(rootDataDir, "indir");
@@ -117,6 +122,7 @@ public class TestMapReduceJobControl ext
}
public void testJobControlWithFailJob() throws Exception {
+ LOG.info("Starting testJobControlWithFailJob");
Configuration conf = createJobConf();
cleanupData(conf);
@@ -139,6 +145,8 @@ public class TestMapReduceJobControl ext
}
public void testJobControlWithKillJob() throws Exception {
+ LOG.info("Starting testJobControlWithKillJob");
+
Configuration conf = createJobConf();
cleanupData(conf);
Job job1 = MapReduceTestUtil.createKillJob(conf, outdir_1, indir);
@@ -175,6 +183,8 @@ public class TestMapReduceJobControl ext
}
public void testJobControl() throws Exception {
+ LOG.info("Starting testJobControl");
+
Configuration conf = createJobConf();
cleanupData(conf);
@@ -193,10 +203,12 @@ public class TestMapReduceJobControl ext
@Test(timeout = 30000)
public void testControlledJob() throws Exception {
+ LOG.info("Starting testControlledJob");
+
Configuration conf = createJobConf();
cleanupData(conf);
Job job1 = MapReduceTestUtil.createCopyJob(conf, outdir_1, indir);
- createDependencies(conf, job1);
+ JobControl theControl = createDependencies(conf, job1);
while (cjob1.getJobState() != ControlledJob.State.RUNNING) {
try {
Thread.sleep(100);
@@ -205,5 +217,10 @@ public class TestMapReduceJobControl ext
}
}
Assert.assertNotNull(cjob1.getMapredJobId());
+
+ // wait till all the jobs complete
+ waitTillAllFinished(theControl);
+ assertEquals("Some jobs failed", 0, theControl.getFailedJobList().size());
+ theControl.stop();
}
}