Pig
  1. Pig
  2. PIG-2006

Regression: NPE when Pig processes an empty script file

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.9.0
    • Component/s: None
    • Labels:
      None

      Description

      If a pig script file is empty and supplied as input for Pig (using -f option), an NPE is thrown. Stacktrace:

      java.lang.NullPointerException
      at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
      at java.util.regex.Matcher.reset(Matcher.java:291)
      at java.util.regex.Matcher.<init>(Matcher.java:211)
      at java.util.regex.Pattern.matcher(Pattern.java:888)
      at org.apache.pig.scripting.ScriptEngine$SupportedScriptLang.accepts(ScriptEngine.java:89)
      at org.apache.pig.scripting.ScriptEngine.getSupportedScriptLang(ScriptEngine.java:163)
      at org.apache.pig.Main.determineScriptType(Main.java:892)
      at org.apache.pig.Main.run(Main.java:378)
      at org.apache.pig.Main.main(Main.java:108)

      This seems related Jython support in 0.9.

      1. PIG-2006.patch
        2 kB
        Xuefu Zhang
      2. PIG-2006-1.patch
        0.5 kB
        Xuefu Zhang

        Activity

        Olga Natkovich made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Xuefu Zhang made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Xuefu Zhang made changes -
        Status Reopened [ 4 ] In Progress [ 3 ]
        Xuefu Zhang made changes -
        Attachment PIG-2006-1.patch [ 12477215 ]
        Xuefu Zhang made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Xuefu Zhang made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Xuefu Zhang made changes -
        Field Original Value New Value
        Attachment PIG-2006.patch [ 12477116 ]
        Xuefu Zhang created issue -

          People

          • Assignee:
            Xuefu Zhang
            Reporter:
            Xuefu Zhang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development