[ 
https://issues.apache.org/jira/browse/PIG-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420992#comment-13420992
 ] 

Rohini Palaniswamy commented on PIG-2729:
-----------------------------------------

No issues. Even I am new to pig :). I was just applying what I learnt from the 
previous jira that I was working on about s3 support. 

I uploaded a patch in review board yesterday and it works fine. Not sure what 
problem you are facing.

The patch looks good. Still have few comments though. Won't bother you more. 
These are the last ones from me :).

1) Can we add createFile("/tmp/mytest2.pig", garbageMacroContent); as the first 
line in importUsingSearchPathTest, importUsingSearchPathTest2 and 
importUsingSearchPathTest3 and createFile("/foo/bar/tmp/mytest2.pig", 
garbageMacroContent); in importUsingSearchPathTest4. Just an additional way to 
ensure the right file is being picked up.

2) Delete the mytest3.pig file in negativeUsingSearchPathTest, just in case 
negativeUsingSearchPathTest2 is executed first and a garbage mytest3.pig file 
is created. ie:
{code}
public void negativeUsingSearchPathTest() throws Exception {
        new File("mytest3.pig").delete();
    assertFalse(verifyImportUsingSearchPath("/tmp/mytest3.pig", "mytest3.pig", 
null));
}
{code}

3) Use Assert.assertFalse instead of 
assertTrue(!verifyImportUsingSearchPath(..)) in negativeTests.

4) Minor nitpick. It would be nice to declare the static variables 
(groupAndCountMacro and garbageMacroContent) in the beginning of the class. Not 
a big deal though.
                
> Macro expansion does not use pig.import.search.path - UnitTest borked
> ---------------------------------------------------------------------
>
>                 Key: PIG-2729
>                 URL: https://issues.apache.org/jira/browse/PIG-2729
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.2, 0.10.0
>         Environment: pig-0.9.2 and pig-0.10.0, hadoop-0.20.2 from Clouderas 
> distribution cdh3u3 on Kubuntu 12.04 64Bit.
>            Reporter: Johannes Schwenk
>             Fix For: 0.10.0
>
>         Attachments: PIG-2729.patch, PIG-2729.patch, PIG-2729.patch, 
> test-macros.tar.gz, use-search-path-for-imports.patch
>
>
> org.apache.pig.test.TestMacroExpansion, in function importUsingSearchPathTest 
> the import statement is provided with the full path to /tmp/mytest2.pig so 
> the pig.import.search.path is never used. I changed the import to 
> import 'mytest2.pig';
> and ran the UnitTest again. This time the test failed as expected from my 
> experience from earlier this day trying in vain to get pig eat my 
> pig.import.search.path property! Other properties in the same custom 
> properties file (provided via -propertyFile command line option) like 
> udf.import.list get read without any problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to