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

Rohini Palaniswamy commented on PIG-2760:
-----------------------------------------

Mathias,
 It requires one more minor change. If we just do cp.startsWith(cwd), then even 
if absolute path was specified and if the script is in a subdirectory under 
current directory, the jar entry only has the relative path instead of the 
absolute path. Need to do cp.equals(cwd + "/" + patch). 

I was addressing script loading issue in PIG-2761 and had some modifications 
for the same line of code. So added your fix to it also and tested and also 
made it part of PIG-2761 patch. Hope you don't mind. If you could, I would 
appreciate you reviewing PIG-2761.
                
> resources added with a relative path are added to the JobXXXX jar file under 
> their absolute path
> ------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2760
>                 URL: https://issues.apache.org/jira/browse/PIG-2760
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>            Reporter: Mathias Herberts
>         Attachments: PIG-2760.patch
>
>
> When registering a local resource using a relative path, the resource is 
> added to the JobXXXX jar under its absolute path.
> If a pig script contains the following:
> REGISTER etc/foo;
> and is executed from a directory /PATH/TO/DIR, the JobXXXX jar file will 
> contain the following:
> /PATH/TO/DIR/etc/foo
> instead of
> etc/foo
> which was the previous behavior

--
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