svn commit: r896947 - /hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestFinish.java
Author: pradeepkth Date: Thu Jan 7 18:07:26 2010 New Revision: 896947 URL: http://svn.apache.org/viewvc?rev=896947view=rev Log: minor fix to cleanup test output file at end of test TestFinish. Modified: hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestFinish.java Modified: hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestFinish.java URL: http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestFinish.java?rev=896947r1=896946r2=896947view=diff == --- hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestFinish.java (original) +++ hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestFinish.java Thu Jan 7 18:07:26 2010 @@ -121,7 +121,9 @@ Util.deleteFile(cluster, inputFileName); Util.deleteFile(cluster, expectedFileName); } else if (execType == ExecType.LOCAL) { -assertTrue(new File(expectedFileName).exists()); +File f = new File(expectedFileName); +assertTrue(f.exists()); +f.delete(); } else { throw new IllegalArgumentException(invalid excetype + execType. toString());
svn commit: r896948 - /hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java
Author: pradeepkth Date: Thu Jan 7 18:08:38 2010 New Revision: 896948 URL: http://svn.apache.org/viewvc?rev=896948view=rev Log: removed FIXME comment for log dir setup in streaming since there is no change in behavior from before Modified: hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java Modified: hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java URL: http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java?rev=896948r1=896947r2=896948view=diff == --- hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java (original) +++ hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java Thu Jan 7 18:08:38 2010 @@ -494,9 +494,7 @@ tmpLocation = new Path(tmpLocationStr); nwJob.setOutputFormatClass(PigOutputFormat.class); -// XXX: FIXME - we can no longer set these due to the new load -// store redesign changes - need to handle this when streaming is -// changed for the new load-store redesign + conf.set(pig.streaming.log.dir, new Path(tmpLocation, LOG_DIR).toString()); conf.set(pig.streaming.task.output.dir, tmpLocation.toString());
svn commit: r897045 - /hadoop/pig/branches/load-store-redesign/src/org/apache/pig/LoadFunc.java
Author: pradeepkth Date: Thu Jan 7 23:06:26 2010 New Revision: 897045 URL: http://svn.apache.org/viewvc?rev=897045view=rev Log: minor fix in getAbsolutePath() in LoadFunc to handle the case where the location is already an absolute path with valid authority in the url Modified: hadoop/pig/branches/load-store-redesign/src/org/apache/pig/LoadFunc.java Modified: hadoop/pig/branches/load-store-redesign/src/org/apache/pig/LoadFunc.java URL: http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/LoadFunc.java?rev=897045r1=897044r2=897045view=diff == --- hadoop/pig/branches/load-store-redesign/src/org/apache/pig/LoadFunc.java (original) +++ hadoop/pig/branches/load-store-redesign/src/org/apache/pig/LoadFunc.java Thu Jan 7 23:06:26 2010 @@ -242,11 +242,16 @@ throw new FrontendException(Incompatible file URI scheme: + scheme + : + fsScheme); } - String path = uri.getPath(); -fname = (p.isAbsolute()) ? -new Path(rootDir, path).toString() : -new Path(curDir, path).toString(); +// if the supplied location has an authority and is absolute, just +// use it +if(uri.getAuthority() != null p.isAbsolute()) { +fname = p.toString(); +} else { +fname = (p.isAbsolute()) ? +new Path(rootDir, path).toString() : +new Path(curDir, path).toString(); +} fname = fname.replaceFirst(^file:/([^/]), file:///$1); pathStrings.add(fname); }