You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Prashant Kommireddi (JIRA)" <ji...@apache.org> on 2012/11/13 23:18:13 UTC

[jira] [Updated] (PIG-3046) An empty file name in -Dpig.additional.jars throws an error

     [ https://issues.apache.org/jira/browse/PIG-3046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Prashant Kommireddi updated PIG-3046:
-------------------------------------

    Attachment: PIG-3046.patch

Patch contains a fix for empty jar path. This does not handle the case when a user specifies a directory instead of a jar file. We will handle that in a separate JIRA where all jars within a dir can be loaded.
                
> An empty file name in -Dpig.additional.jars throws an error
> -----------------------------------------------------------
>
>                 Key: PIG-3046
>                 URL: https://issues.apache.org/jira/browse/PIG-3046
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Cheolsoo Park
>              Labels: newbie
>         Attachments: PIG-3046.patch
>
>
> This issue was raised on the user mailing list. To reproduce it, please run the following command in MR mode:
> {code}
> pig -Dpig.additional.jars=<jar1>::<jar2> <pig script>
> {code}
> As can be seen, I put {{::}} in the middle of {{-Dpig.additional.jars}}, and this causes the following error:
> {code}
> Caused by: java.lang.IllegalArgumentException: Can not create a Path from
> an empty string at org.apache.hadoop.fs.Path.checkPathArg(Path.java:82)
> at org.apache.hadoop.fs.Path.<init>(Path.java:90)
> at org.apache.hadoop.fs.Path.<init>(Path.java:45)
> at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.shipToHDFS(JobControlCompiler.java:1455)
> at
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.putJarOnClassPathThroughDistributedCache(JobControlCompiler.java:1432)
> at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:508)
> {code}
> Although it's not too hard to see what's wrong, it's not always easy to track down where an empty file name is from. In particular if various environment variables are set in another start-up script, it's time-consuming to identify the root cause.
> In fact, Pig should just skip an empty file name instead attempts to convert it to a path and throws an exception like this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira