Pig
  1. Pig
  2. PIG-2487

When a parameter is specified in a script, but no comamnd is specified in via -param/defaults, a LOUD warning should be thrown

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 0.9.1, 0.9.2, 0.10.0, 0.9.3
    • Fix Version/s: None
    • Component/s: grunt, parser
    • Labels:
      None
    • Environment:

      Mac OS X

    • Tags:
      pig

      Description

      I spend a lot of time debugging scripts, where I forget to start pig with params, and suddenly my filters result in 0 records getting through the script. I would like a LOUD error on this, when it happens.

        Activity

        Hide
        Thejas M Nair added a comment -

        It does throw an error if you forget to specify params, for example -

        $ cat t.pig
        l = load $INP using PigStorage(':');
        dump l;
        
        $ bin/pig -x local   t.pig 
        2012-01-23 18:53:05,204 [main] INFO  org.apache.pig.Main - Logging error messages to: /Users/thejas/pig_trunk_cp/trunk/pig_1327373585202.log
        2012-01-23 18:53:05,387 [main] ERROR org.apache.pig.Main - ERROR 2999: Unexpected internal error. Undefined parameter : INP
        

        Can you show an example where it does not throw this error ?

        Show
        Thejas M Nair added a comment - It does throw an error if you forget to specify params, for example - $ cat t.pig l = load $INP using PigStorage(':'); dump l; $ bin/pig -x local t.pig 2012-01-23 18:53:05,204 [main] INFO org.apache.pig.Main - Logging error messages to: /Users/thejas/pig_trunk_cp/trunk/pig_1327373585202.log 2012-01-23 18:53:05,387 [main] ERROR org.apache.pig.Main - ERROR 2999: Unexpected internal error. Undefined parameter : INP Can you show an example where it does not throw this error ?

          People

          • Assignee:
            Unassigned
            Reporter:
            Russell Jurney
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development