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

Andrew C. Oliver commented on PIG-4156:
---------------------------------------

This fixes AN issue, but not all of my issues. If I put my hive/etc jars on 
HDFS then without this patch I get an NPE. (And that code is obviously bogus in 
that it doesn't check for null in the second part of an OR condition that it 
does in the first clause). 

I wanted to at least fix the NPE so things work. I was hoping to get some level 
of "yes that's a good idea" before proposing a new flag to force jars to go 
local so I opened a thread for that. If there is some level of consensus I'll 
provide a different patch for the "I don't want all my jars remote just cause 
my script is" problem.

Does that make sense?

> [PATCH] fix NPE when running scripts stored on hdfs://
> ------------------------------------------------------
>
>                 Key: PIG-4156
>                 URL: https://issues.apache.org/jira/browse/PIG-4156
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.12.0, 0.12.1, 0.13.0, 0.13.1
>         Environment: Linux / CentOS 6
>            Reporter: Andrew C. Oliver
>             Fix For: 0.12.1
>
>         Attachments: fixnpe-trunk.patch, fixnpe.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> pig -useHCatalog hdfs://myserver:8020/load/scripts/mydir/myscript.pig
> throws a NPE due to a bogus if statement (patch included)
> Error before Pig is launched
> ----------------------------
> ERROR 2999: Unexpected internal error. null
> java.lang.NullPointerException
>         at 
> org.apache.pig.impl.io.FileLocalizer.fetchFilesInternal(FileLocalizer.java:799)
>         at 
> org.apache.pig.impl.io.FileLocalizer.fetchFiles(FileLocalizer.java:767)
>         at org.apache.pig.PigServer.registerJar(PigServer.java:546)
>         at org.apache.pig.PigServer.addJarsFromProperties(PigServer.java:253)
>         at org.apache.pig.PigServer.<init>(PigServer.java:231)
>         at org.apache.pig.PigServer.<init>(PigServer.java:214)
>         at org.apache.pig.tools.grunt.Grunt.<init>(Grunt.java:46)
>         at org.apache.pig.Main.run(Main.java:603)
>         at org.apache.pig.Main.main(Main.java:164)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
> ================================================================================



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to