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

Configuration of Pig

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.1.0
    • None
    • None
    • Patch Available

    Description

      This JIRA discusses issues relating to the configuration of Pig.

      Uses cases:

      1. I want to configure Pig programatically from Java
      Motivation: pig can be embedded from another Java program, and configuration should be accessible to be set by the client code
      2. I want to configure Pig from the command line
      3. I want to configure Pig from the Pig shell (Grunt)
      4. I want Pig to remember my configuration for every Pig session
      Motivation: to save me typing in some configuration stuff every time.
      5. I want Pig to remember my configuration for this script.
      Motivation: I must use a common configuration for 50% of my Pig scripts - can I share this configuration between scripts.

      Current Status:

      • Pig uses System properties for some configuration
      • A configuration properties object in PigContext is not used.
      • pigrc can contain properties
      • Configuration properties can not be set from Grunt

      Proposed solutions to use cases:
      1. Configuration should be set in PigContext, and accessible from client code.
      2. System properties are copied to PigContext, or can be specified on the command line (duplication with System properties)
      3. Allow configuration properties to be set using the "set" command in Grunt
      4. Pigrc can contain properties. Is this enough, or can other configuration stuff be set, eg aliases, imports, etc.
      5. Add an include directive to pig, to allow a shared configuration/Pig script to be included.

      Connections to Shell scripting:

      • The source command in Bash allows another bash script file to be included - this allows shared variables to be set in one file shared between a set of scripts.
      • Aliases can be set, according to user preferences, etc.
      • All this can be done in your .bashrc file

      Issues:

      • What happens when you change a property after the property has been read?
      • Can Grunt read a pigrc containing various statements etc before the PigServer is completely configured?

      Attachments

        1. after.png
          5 kB
          Benjamin Francisoud
        2. before.png
          6 kB
          Benjamin Francisoud
        3. config.patch.1502
          6 kB
          Craig Macdonald
        4. PIG_111_v10.patch
          149 kB
          Pi Song
        5. PIG-111_v_11.patch
          146 kB
          Johannes Zillmann
        6. PIG-111_v_3_sg.patch
          83 kB
          Stefan Groschupf
        7. PIG-111_v_7_r633244M.patch
          94 kB
          Stefan Groschupf
        8. PIG-111_v_8_r633244M.patch
          96 kB
          Stefan Groschupf
        9. PIG-111_v_9_r641081.patch
          167 kB
          Johannes Zillmann
        10. PIG-111_v12.patch
          153 kB
          Johannes Zillmann
        11. pig-111_v13.patch
          153 kB
          Pi Song
        12. PIG-111-v04.patch
          90 kB
          Benjamin Francisoud
        13. PIG-111-v05.patch
          98 kB
          Benjamin Francisoud
        14. PIG-111-v06.patch
          100 kB
          Benjamin Francisoud
        15. PIG-93-v01.patch
          23 kB
          Benjamin Francisoud
        16. PIG-93-v02.patch
          17 kB
          Benjamin Francisoud
        17. TEST-org.apache.pig.test.PigContextTest.txt
          5 kB
          Alan Gates
        18. TEST-org.apache.pig.test.TestStreaming.txt
          41 kB
          Pi Song
        19. TEST-org.apache.pig.test.TestStreaming.txt
          45 kB
          Alan Gates

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            joa23 Stefan Groschupf
            craigm Craig Macdonald
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment