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

          Alan Gates made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Alan Gates made changes -
          Assignee Benjamin Francisoud [ francisoud ]
          Owen O'Malley made changes -
          Workflow jira [ 12422772 ] no-reopen-closed, patch-avail [ 12425387 ]
          Alan Gates made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 0.1.0 [ 12312848 ]
          Resolution Fixed [ 1 ]
          Benjamin Francisoud made changes -
          Attachment PIG-92-v02.patch [ 12375245 ]
          Benjamin Francisoud made changes -
          Attachment PIG-92-v01.patch [ 12374778 ]
          Benjamin Francisoud made changes -
          Link This issue is related to PIG-69 [ PIG-69 ]
          Benjamin Francisoud made changes -
          Field Original Value New Value
          Link This issue is related to PIG-32 [ PIG-32 ]
          Benjamin Francisoud created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development