You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Andrew C. Oliver (JIRA)" <ji...@apache.org> on 2014/09/06 00:15:28 UTC

[jira] [Updated] (PIG-4156) [PATCH] fix NPE when running scripts stored on hdfs://

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

Andrew C. Oliver updated PIG-4156:
----------------------------------
    Fix Version/s:     (was: 0.13.1)
                       (was: 0.14.0)
     Release Note: I will also post one for trunk
           Status: Patch Available  (was: Open)

Index: src/org/apache/pig/impl/io/FileLocalizer.java
===================================================================
--- src/org/apache/pig/impl/io/FileLocalizer.java	(revision 1622795)
+++ src/org/apache/pig/impl/io/FileLocalizer.java	(working copy)
@@ -734,7 +734,8 @@
         FileSystem srcFs;
         if ( (!"true".equals(properties.getProperty("pig.jars.relative.to.dfs"))
                 && uri.getScheme() == null )||
-                uri.getScheme().equals("local") ) {
+                (uri.getScheme() != null && uri.getScheme().equals("local")) 
+           ) {
             srcFs = localFs;
         } else {
             srcFs = path.getFileSystem(conf);


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