You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by hi...@apache.org on 2016/06/10 06:56:09 UTC

tez git commit: TEZ-3295. TestOrderedWordCount should handle relative input/output paths. (Sushmitha Sreenivasan via hitesh)

Repository: tez
Updated Branches:
  refs/heads/master 2c212858a -> 89859698c


TEZ-3295. TestOrderedWordCount should handle relative input/output paths. (Sushmitha Sreenivasan via hitesh)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/89859698
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/89859698
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/89859698

Branch: refs/heads/master
Commit: 89859698cde9ff87ddaefbe00d7e70cc743721e5
Parents: 2c21285
Author: Hitesh Shah <hi...@apache.org>
Authored: Thu Jun 9 23:46:47 2016 -0700
Committer: Hitesh Shah <hi...@apache.org>
Committed: Thu Jun 9 23:46:47 2016 -0700

----------------------------------------------------------------------
 CHANGES.txt                                                  | 1 +
 .../apache/tez/mapreduce/examples/TestOrderedWordCount.java  | 8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/89859698/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 3fcb936..0798faf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ INCOMPATIBLE CHANGES
 
 ALL CHANGES:
 
+  TEZ-3295. TestOrderedWordCount should handle relative input/output paths.
   TEZ-3290. Set full task attempt id string in MRInput configuration object.
   TEZ-2846. Flaky test: TestCommit.testVertexCommit_OnDAGSuccess.
   TEZ-3289. Tez Example MRRSleep job does not set Staging dir correctly on secure cluster.

http://git-wip-us.apache.org/repos/asf/tez/blob/89859698/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java
index 6ed6d2d..af455fb 100644
--- a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java
+++ b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/TestOrderedWordCount.java
@@ -369,14 +369,16 @@ public class TestOrderedWordCount extends Configured implements Tool {
 
     List<String> inputPaths = new ArrayList<String>();
     List<String> outputPaths = new ArrayList<String>();
+    TezConfiguration tezConf = new TezConfiguration(conf);
 
     for (int i = 0; i < otherArgs.length; i+=2) {
-      inputPaths.add(otherArgs[i]);
-      outputPaths.add(otherArgs[i+1]);
+      FileSystem inputPathFs = new Path(otherArgs[i]).getFileSystem(tezConf);
+      inputPaths.add(inputPathFs.makeQualified(new Path(otherArgs[i])).toString());
+      FileSystem outputPathFs = new Path(otherArgs[i+1]).getFileSystem(tezConf);
+      outputPaths.add(outputPathFs.makeQualified(new Path(otherArgs[i+1])).toString());
     }
 
     UserGroupInformation.setConfiguration(conf);
-    TezConfiguration tezConf = new TezConfiguration(conf);
     HadoopShim hadoopShim = new HadoopShimsLoader(tezConf).getHadoopShim();
     TestOrderedWordCount instance = new TestOrderedWordCount();