Pig
  1. Pig
  2. PIG-92

PigContext NullPointerException because of uninitialize conf

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.1.0
    • Fix Version/s: 0.1.0
    • Component/s: impl
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      This simple code throw an NPE

      final PigContext pigContext = new PigContext(ExecType.MAPREDUCE);
      pigContext.getConf().putAll(properties);
      

      Because in PigContext.java:

      transient private Properties conf = null;
      public void connect() throws ExecException {
          ... 
          conf = new Properties();
          ....
      }
      

      Simple patch:

      transient private Properties conf = new Properties();
      public void connect() throws ExecException {
          ... 
      }
      

      This is regression already fix in PIG-69.
      Introduce with PIG-32

      1. PIG-92-v02.patch
        0.9 kB
        Benjamin Francisoud
      2. PIG-92-v01.patch
        0.9 kB
        Benjamin Francisoud

        Issue Links

          Activity

          Hide
          Benjamin Francisoud added a comment -

          Patch as explain in the jira description.

          Show
          Benjamin Francisoud added a comment - Patch as explain in the jira description.
          Hide
          Olga Natkovich added a comment -

          Does this patch still needs to be applied?

          From the comment above, it seems that it has already been adressed in another bug.

          Show
          Olga Natkovich added a comment - Does this patch still needs to be applied? From the comment above, it seems that it has already been adressed in another bug.
          Hide
          Benjamin Francisoud added a comment -

          > Does this patch still needs to be applied?

          Unless I missed something, I don't think the null pointer has been fix...

          Show
          Benjamin Francisoud added a comment - > Does this patch still needs to be applied? Unless I missed something, I don't think the null pointer has been fix...
          Hide
          Olga Natkovich added a comment -

          ok, could you then regenerate your patch from the latest svn, thanks.

          Show
          Olga Natkovich added a comment - ok, could you then regenerate your patch from the latest svn, thanks.
          Hide
          Benjamin Francisoud added a comment -

          new patch against trunk r620508

          Show
          Benjamin Francisoud added a comment - new patch against trunk r620508
          Hide
          Alan Gates added a comment -

          Patch contributed by Benjamin Francisoud committed as revision 620878. Thanks Benjamin.

          Show
          Alan Gates added a comment - Patch contributed by Benjamin Francisoud committed as revision 620878. Thanks Benjamin.

            People

            • Assignee:
              Benjamin Francisoud
              Reporter:
              Benjamin Francisoud
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development