hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cnaur...@apache.org
Subject svn commit: r1500194 - in /hadoop/common/trunk/hadoop-mapreduce-project: CHANGES.txt hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestMRJobClient.java
Date Sat, 06 Jul 2013 03:34:24 GMT
Author: cnauroth
Date: Sat Jul  6 03:34:23 2013
New Revision: 1500194

URL: http://svn.apache.org/r1500194
Log:
MAPREDUCE-5360. TestMRJobClient fails on Windows due to path format. Contributed by Chuan
Liu.

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/TestMRJobClient.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=1500194&r1=1500193&r2=1500194&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Sat Jul  6 03:34:23 2013
@@ -612,6 +612,9 @@ Release 2.1.0-beta - 2013-07-02
     MAPREDUCE-5357. Job staging directory owner checking could fail on Windows.
     (Chuan Liu via cnauroth)
 
+    MAPREDUCE-5360. TestMRJobClient fails on Windows due to path format.
+    (Chuan Liu via cnauroth)
+
     MAPREDUCE-5291. Change MR App to use updated property names in
     container-log4j.properties. (Zhijie Shen via sseth)
 

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestMRJobClient.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/TestMRJobClient.java?rev=1500194&r1=1500193&r2=1500194&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestMRJobClient.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestMRJobClient.java
Sat Jul  6 03:34:23 2013
@@ -211,6 +211,10 @@ public class TestMRJobClient extends Clu
     job.setPriority(JobPriority.NORMAL);
 
     File fcon = File.createTempFile("config", ".xml");
+    FileSystem localFs = FileSystem.getLocal(conf);
+    String fconUri = new Path(fcon.getAbsolutePath())
+        .makeQualified(localFs.getUri(), localFs.getWorkingDirectory()).toUri()
+        .toString();
 
     job.getConfiguration().writeXml(new FileOutputStream(fcon));
     ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -220,7 +224,7 @@ public class TestMRJobClient extends Clu
     
     
     exitCode = runTool(conf, jc,
-        new String[] { "-submit", "file://" + fcon.getAbsolutePath() }, out);
+        new String[] { "-submit", fconUri }, out);
     assertEquals("Exit code", 0, exitCode);
     String answer = new String(out.toByteArray());
     // in console was written
@@ -335,13 +339,18 @@ public class TestMRJobClient extends Clu
     CLI jc = createJobClient();
     ByteArrayOutputStream out = new ByteArrayOutputStream();
     File f = new File("src/test/resources/job_1329348432655_0001-10.jhist");
+    FileSystem localFs = FileSystem.getLocal(conf);
+    String historyFileUri = new Path(f.getAbsolutePath())
+        .makeQualified(localFs.getUri(), localFs.getWorkingDirectory()).toUri()
+        .toString();
+ 
     // bad command
-    int exitCode = runTool(conf, jc, new String[] { "-history", "pul",
-        "file://" + f.getAbsolutePath() }, out);
+    int exitCode = runTool(conf, jc, new String[] { "-history", "pul", 
+        historyFileUri }, out);
     assertEquals("Exit code", -1, exitCode);
 
     exitCode = runTool(conf, jc, new String[] { "-history", "all",
-        "file://" + f.getAbsolutePath() }, out);
+        historyFileUri }, out);
     assertEquals("Exit code", 0, exitCode);
     String line;
     BufferedReader br = new BufferedReader(new InputStreamReader(



Mime
View raw message