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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1d 23h 10m 1 Xuefu Zhang 23/Apr/11 00:32
        Resolved Resolved Reopened Reopened
        17h 59m 1 Xuefu Zhang 23/Apr/11 18:31
        Reopened Reopened In Progress In Progress
        3d 41m 1 Xuefu Zhang 26/Apr/11 19:13
        In Progress In Progress Resolved Resolved
        9s 1 Xuefu Zhang 26/Apr/11 19:13
        Resolved Resolved Closed Closed
        99d 6h 21m 1 Olga Natkovich 04/Aug/11 01:34
        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 ]
        Hide
        Xuefu Zhang added a comment -

        Fix the failing test case.

        Show
        Xuefu Zhang added a comment - Fix the failing test case.
        Xuefu Zhang made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Xuefu Zhang added a comment -

        The newly added test case fails when running as part of unit test set.

        Show
        Xuefu Zhang added a comment - The newly added test case fails when running as part of unit test set.
        Xuefu Zhang made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Xuefu Zhang added a comment -

        Patch is committed to both trunk and 0.9 branch. Issue is resolved.

        Show
        Xuefu Zhang added a comment - Patch is committed to both trunk and 0.9 branch. Issue is resolved.
        Hide
        Xuefu Zhang added a comment -

        Test-patch run:

        [exec] +1 overall.
        [exec]
        [exec] +1 @author. The patch does not contain any @author tags.
        [exec]
        [exec] +1 tests included. The patch appears to include 3 new or modified tests.
        [exec]
        [exec] +1 javadoc. The javadoc tool did not generate any warning messages.
        [exec]
        [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
        [exec]
        [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
        [exec]
        [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.

        Show
        Xuefu Zhang added a comment - Test-patch run: [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 3 new or modified tests. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.
        Hide
        Richard Ding added a comment -

        +1

        Show
        Richard Ding added a comment - +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