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

PigContext NullPointerException because of uninitialize conf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.1.0
    • 0.1.0
    • impl
    • None
    • 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-v01.patch
          0.9 kB
          Benjamin Francisoud
        2. PIG-92-v02.patch
          0.9 kB
          Benjamin Francisoud

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: