You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2012/03/16 23:05:19 UTC
svn commit: r1301785 - /pig/trunk/test/org/apache/pig/test/TestPigServer.java
Author: daijy
Date: Fri Mar 16 22:05:19 2012
New Revision: 1301785
URL: http://svn.apache.org/viewvc?rev=1301785&view=rev
Log:
Fix TestPigServer.testRegisterRemoteMacro failure caused by PIG-2565
Modified:
pig/trunk/test/org/apache/pig/test/TestPigServer.java
Modified: pig/trunk/test/org/apache/pig/test/TestPigServer.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestPigServer.java?rev=1301785&r1=1301784&r2=1301785&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestPigServer.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestPigServer.java Fri Mar 16 22:05:19 2012
@@ -409,9 +409,13 @@ public class TestPigServer {
FileSystem fs = cluster.getFileSystem();
fs.copyFromLocalFile(new Path(macroFile.getAbsolutePath()), new Path(macroName));
+ // find the absolute path for the directory so that it does not
+ // depend on configuration
+ String absPath = fs.getFileStatus(new Path(macroName)).getPath().toString();
+
Util.createInputFile(cluster, "testRegisterRemoteMacro_input", new String[]{"1", "2"});
- pig.registerQuery("import 'util.pig';");
+ pig.registerQuery("import '" + absPath + "';");
pig.registerQuery("a = load 'testRegisterRemoteMacro_input';");
pig.registerQuery("b = row_count(a);");
Iterator<Tuple> iter = pig.openIterator("b");