You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cu...@apache.org on 2007/08/14 23:51:06 UTC
svn commit: r565934 - in /lucene/hadoop/branches/branch-0.14: CHANGES.txt
src/examples/pipes/impl/wordcount-nopipe.cc
src/test/org/apache/hadoop/mapred/pipes/TestPipes.java
src/test/org/apache/hadoop/mapred/pipes/WordCountInputFormat.java
Author: cutting
Date: Tue Aug 14 14:51:04 2007
New Revision: 565934
URL: http://svn.apache.org/viewvc?view=rev&rev=565934
Log:
Merge -r 565931:565932 from trunk to 0.14 branch. Fixes: HADOOP-1716.
Modified:
lucene/hadoop/branches/branch-0.14/CHANGES.txt
lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-nopipe.cc
lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java
lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/mapred/pipes/WordCountInputFormat.java
Modified: lucene/hadoop/branches/branch-0.14/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/CHANGES.txt?view=diff&rev=565934&r1=565933&r2=565934
==============================================================================
--- lucene/hadoop/branches/branch-0.14/CHANGES.txt (original)
+++ lucene/hadoop/branches/branch-0.14/CHANGES.txt Tue Aug 14 14:51:04 2007
@@ -517,6 +517,10 @@
153. HADOOP-1698. Fix performance problems on map output sorting for jobs
with large numbers of reduces. (Devaraj Das via omalley)
+154. HADOOP-1716. Fix a Pipes wordcount example to remove the 'file:'
+ schema from its output path. (omalley via cutting)
+
+
Release 0.13.0 - 2007-06-08
1. HADOOP-1047. Fix TestReplication to succeed more reliably.
Modified: lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-nopipe.cc
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-nopipe.cc?view=diff&rev=565934&r1=565933&r2=565934
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-nopipe.cc (original)
+++ lucene/hadoop/branches/branch-0.14/src/examples/pipes/impl/wordcount-nopipe.cc Tue Aug 14 14:51:04 2007
@@ -87,9 +87,15 @@
const HadoopPipes::JobConf* job = context.getJobConf();
int part = job->getInt("mapred.task.partition");
std::string outDir = job->get("mapred.output.dir");
+ // remove the file: schema substring
+ std::string::size_type posn = outDir.find(":");
+ HADOOP_ASSERT(posn != std::string::npos,
+ "no schema found in output dir: " + outDir);
+ outDir.erase(0, posn+1);
mkdir(outDir.c_str(), 0777);
std::string outFile = outDir + "/part-" + HadoopUtils::toString(part);
file = fopen(outFile.c_str(), "wt");
+ HADOOP_ASSERT(file != NULL, "can't open file for writing: " + outFile);
}
~WordCountWriter() {
Modified: lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java?view=diff&rev=565934&r1=565933&r2=565934
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java (original)
+++ lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java Tue Aug 14 14:51:04 2007
@@ -150,7 +150,8 @@
JobConf job = mr.createJobConf();
job.setInputFormat(WordCountInputFormat.class);
FileSystem local = FileSystem.getLocal(job);
- Path testDir = new Path(System.getProperty("test.build.data"), "pipes");
+ Path testDir = new Path("file:" + System.getProperty("test.build.data"),
+ "pipes");
Path inDir = new Path(testDir, "input");
Path outDir = new Path(testDir, "output");
Path wordExec = new Path("/testing/bin/application");
Modified: lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/mapred/pipes/WordCountInputFormat.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/mapred/pipes/WordCountInputFormat.java?view=diff&rev=565934&r1=565933&r2=565934
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/mapred/pipes/WordCountInputFormat.java (original)
+++ lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/mapred/pipes/WordCountInputFormat.java Tue Aug 14 14:51:04 2007
@@ -35,7 +35,7 @@
private String filename;
WordCountInputSplit() { }
WordCountInputSplit(Path filename) {
- this.filename = filename.toString();
+ this.filename = filename.toUri().getPath();
}
public void write(DataOutput out) throws IOException {
Text.writeString(out, filename);