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

Adam Szita commented on PIG-3046:
---------------------------------

[~AsmaData],
CDH 5.8 has Pig 0.12.0 so this patch should be included.
I also ran a small test to see this in action, and the WARN message does come 
up:
{code}
-bash-4.1$ pig -Dpig.additional.jars=:test1.jar:test2.jar

log4j:WARN No appenders could be found for logger 
(org.apache.hadoop.util.Shell).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more 
info.
2017-01-04 00:50:32,904 [main] INFO  org.apache.pig.Main - Apache Pig version 
0.12.0-cdh5.8.4-SNAPSHOT (rexported) compiled Jan 03 2017, 01:36:52
2017-01-04 00:50:32,905 [main] INFO  org.apache.pig.Main - Logging error 
messages to: /var/lib/hadoop-hdfs/pig_1483519832863.log
2017-01-04 00:50:32,950 [main] INFO  org.apache.pig.impl.util.Utils - Default 
bootup file /var/lib/hadoop-hdfs/.pigbootup not found
2017-01-04 00:50:34,104 [main] INFO  
org.apache.hadoop.conf.Configuration.deprecation - mapred.job.tracker is 
deprecated. Instead, use mapreduce.jobtracker.address
2017-01-04 00:50:34,104 [main] INFO  
org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is 
deprecated. Instead, use fs.defaultFS
2017-01-04 00:50:34,104 [main] INFO  
org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to 
hadoop file system at: hdfs://ns1
2017-01-04 00:50:36,160 [main] INFO  
org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is 
deprecated. Instead, use fs.defaultFS
2017-01-04 00:50:36,170 [main] WARN  org.apache.pig.PigServer - Empty string 
specified for jar path
{code}

> 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
>    Affects Versions: 0.10.0, 0.11
>            Reporter: Cheolsoo Park
>            Assignee: Prashant Kommireddi
>              Labels: newbie
>             Fix For: 0.12.0
>
>         Attachments: PIG-3046.patch, PIG-3046_1.patch, PIG-3046_2.patch, 
> PIG-3046_3.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 was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to