Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-92

PigContext NullPointerException because of uninitialize conf

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

        Attachments

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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: