Pig
  1. Pig
  2. PIG-2833

org.apache.pig.pigunit.pig.PigServer does not initialize set default log level of pigContext

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      pig-0.10.0, Hadoop 2.0.0-cdh4.0.1 on Kubuntu 12.04 64Bit.

      Description

      The class org.apache.pig.pigunit.pig.PigServer does not set the default log level of its instance of PigContext so that pigunit tests that have

      set debug off;
      

      in them, will cause a NullPointerException at org.apache.pig.PigServer line 291 because the default log level is not set.

      So I think org.apache.pig.pigunit.pig.PigServer should do something like

      pigContext.setDefaultLogLevel(Level.INFO);
      

      in its contructors.

      1. PIG-2833.patch
        2 kB
        Cheolsoo Park

        Activity

        Hide
        Cheolsoo Park added a comment -

        Attached is a patch that initializes the default log level of PigContext to Level.INFO.

        I also added two test cases to TestGrunt to verify "set debug on/off" work properly.

        Show
        Cheolsoo Park added a comment - Attached is a patch that initializes the default log level of PigContext to Level.INFO. I also added two test cases to TestGrunt to verify "set debug on/off" work properly.
        Hide
        Johannes Schwenk added a comment -

        Thank you very much for your quick reaction, Cheolsoo! Could you also have a look at PIG-2832 which might be a similar issue?

        Show
        Johannes Schwenk added a comment - Thank you very much for your quick reaction, Cheolsoo! Could you also have a look at PIG-2832 which might be a similar issue?
        Hide
        Jonathan Coveney added a comment -

        Thanks for the contribution, Cheolsoo! Committed to trunk.

        Show
        Jonathan Coveney added a comment - Thanks for the contribution, Cheolsoo! Committed to trunk.

          People

          • Assignee:
            Cheolsoo Park
            Reporter:
            Johannes Schwenk
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development