Grokbase Groups Pig dev May 2011
FAQ
'explain -script' does not perform parameter substitution for parameters specified on commandline
-------------------------------------------------------------------------------------------------

Key: PIG-2100
URL: https://issues.apache.org/jira/browse/PIG-2100
Project: Pig
Issue Type: Bug
Affects Versions: 0.8.1, 0.8.0, 0.9.0
Reporter: Thejas M Nair
Fix For: 0.9.0


{code}
# the file
$ cat t.pig
a = load '$file' as (a0, a1);
dump a;

# parameter on commandline gets substituted
$ java -Xmx500m -classpath pig.jar org.apache.pig.Main -x local -dryrun -p file=x t.pig
2011-05-31 14:00:24,999 [main] INFO org.apache.pig.Main - Logging error messages to: /Users/tejas/pig_lpgen_2083/trunk/pig_1306875624997.log
2011-05-31 14:00:25,321 [main] INFO org.apache.pig.Main - Dry run completed. Substituted pig script is at t.pig.substituted

$ cat t.pig.substituted
a = load 'x' as (a0, a1);
dump a;

# but param in commandline does not get used for explain command, and it fails

java -Xmx500m -classpath pig.jar org.apache.pig.Main -x local -p file=x -e 'explain -script t.pig;'
2011-05-31 14:01:07,217 [main] INFO org.apache.pig.Main - Logging error messages to: /Users/tejas/pig_lpgen_2083/trunk/pig_1306875667215.log
2011-05-31 14:01:07,364 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: file:///
2011-05-31 14:01:07,547 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2999: Unexpected internal error. Undefined parameter : file

# parameter gets substituted when specified using %declare statement.
cat t2.pig
%declare file x
a = load '$file' as (a0, a1);
dump a;

java -Xmx500m -classpath pig.jar org.apache.pig.Main -x local -p file=x -e 'explain -script t2.pig;'
..
2011-05-31 14:01:44,059 [main] WARN org.apache.pig.tools.grunt.GruntParser - 'dump' statement is ignored while processing 'explain -script' or '-check'
Logical plan is empty.
Physical plan is empty.
Execution plan is empty.

{code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Search Discussions

  • Olga Natkovich (JIRA) at May 31, 2011 at 11:29 pm
    [ https://issues.apache.org/jira/browse/PIG-2100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Olga Natkovich updated PIG-2100:
    --------------------------------

    Fix Version/s: (was: 0.9.0)
    'explain -script' does not perform parameter substitution for parameters specified on commandline
    -------------------------------------------------------------------------------------------------

    Key: PIG-2100
    URL: https://issues.apache.org/jira/browse/PIG-2100
    Project: Pig
    Issue Type: Bug
    Affects Versions: 0.8.0, 0.8.1, 0.9.0
    Reporter: Thejas M Nair

    {code}
    # the file
    $ cat t.pig
    a = load '$file' as (a0, a1);
    dump a;
    # parameter on commandline gets substituted
    $ java -Xmx500m -classpath pig.jar org.apache.pig.Main -x local -dryrun -p file=x t.pig
    2011-05-31 14:00:24,999 [main] INFO org.apache.pig.Main - Logging error messages to: /Users/tejas/pig_lpgen_2083/trunk/pig_1306875624997.log
    2011-05-31 14:00:25,321 [main] INFO org.apache.pig.Main - Dry run completed. Substituted pig script is at t.pig.substituted
    $ cat t.pig.substituted
    a = load 'x' as (a0, a1);
    dump a;
    # but param in commandline does not get used for explain command, and it fails
    java -Xmx500m -classpath pig.jar org.apache.pig.Main -x local -p file=x -e 'explain -script t.pig;'
    2011-05-31 14:01:07,217 [main] INFO org.apache.pig.Main - Logging error messages to: /Users/tejas/pig_lpgen_2083/trunk/pig_1306875667215.log
    2011-05-31 14:01:07,364 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: file:///
    2011-05-31 14:01:07,547 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2999: Unexpected internal error. Undefined parameter : file
    # parameter gets substituted when specified using %declare statement.
    cat t2.pig
    %declare file x
    a = load '$file' as (a0, a1);
    dump a;
    java -Xmx500m -classpath pig.jar org.apache.pig.Main -x local -p file=x -e 'explain -script t2.pig;'
    ..
    2011-05-31 14:01:44,059 [main] WARN org.apache.pig.tools.grunt.GruntParser - 'dump' statement is ignored while processing 'explain -script' or '-check'
    Logical plan is empty.
    Physical plan is empty.
    Execution plan is empty.
    {code}
    --
    This message is automatically generated by JIRA.
    For more information on JIRA, see: http://www.atlassian.com/software/jira
  • Thejas M Nair (JIRA) at Jun 24, 2011 at 12:07 am
    [ https://issues.apache.org/jira/browse/PIG-2100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair reassigned PIG-2100:
    ----------------------------------

    Assignee: Thejas M Nair
    'explain -script' does not perform parameter substitution for parameters specified on commandline
    -------------------------------------------------------------------------------------------------

    Key: PIG-2100
    URL: https://issues.apache.org/jira/browse/PIG-2100
    Project: Pig
    Issue Type: Bug
    Affects Versions: 0.8.0, 0.8.1, 0.9.0
    Reporter: Thejas M Nair
    Assignee: Thejas M Nair

    {code}
    # the file
    $ cat t.pig
    a = load '$file' as (a0, a1);
    dump a;
    # parameter on commandline gets substituted
    $ java -Xmx500m -classpath pig.jar org.apache.pig.Main -x local -dryrun -p file=x t.pig
    2011-05-31 14:00:24,999 [main] INFO org.apache.pig.Main - Logging error messages to: /Users/tejas/pig_lpgen_2083/trunk/pig_1306875624997.log
    2011-05-31 14:00:25,321 [main] INFO org.apache.pig.Main - Dry run completed. Substituted pig script is at t.pig.substituted
    $ cat t.pig.substituted
    a = load 'x' as (a0, a1);
    dump a;
    # but param in commandline does not get used for explain command, and it fails
    java -Xmx500m -classpath pig.jar org.apache.pig.Main -x local -p file=x -e 'explain -script t.pig;'
    2011-05-31 14:01:07,217 [main] INFO org.apache.pig.Main - Logging error messages to: /Users/tejas/pig_lpgen_2083/trunk/pig_1306875667215.log
    2011-05-31 14:01:07,364 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: file:///
    2011-05-31 14:01:07,547 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2999: Unexpected internal error. Undefined parameter : file
    # parameter gets substituted when specified using %declare statement.
    cat t2.pig
    %declare file x
    a = load '$file' as (a0, a1);
    dump a;
    java -Xmx500m -classpath pig.jar org.apache.pig.Main -x local -p file=x -e 'explain -script t2.pig;'
    ..
    2011-05-31 14:01:44,059 [main] WARN org.apache.pig.tools.grunt.GruntParser - 'dump' statement is ignored while processing 'explain -script' or '-check'
    Logical plan is empty.
    Physical plan is empty.
    Execution plan is empty.
    {code}
    --
    This message is automatically generated by JIRA.
    For more information on JIRA, see: http://www.atlassian.com/software/jira
  • Thejas M Nair (JIRA) at Jun 30, 2011 at 11:37 pm
    [ https://issues.apache.org/jira/browse/PIG-2100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-2100:
    -------------------------------

    Attachment: PIG-2100.0.patch

    PIG-2100.0.patch - initial patch, not ready for review or commit
    'explain -script' does not perform parameter substitution for parameters specified on commandline
    -------------------------------------------------------------------------------------------------

    Key: PIG-2100
    URL: https://issues.apache.org/jira/browse/PIG-2100
    Project: Pig
    Issue Type: Bug
    Affects Versions: 0.8.0, 0.8.1, 0.9.0
    Reporter: Thejas M Nair
    Assignee: Thejas M Nair
    Attachments: PIG-2100.0.patch


    {code}
    # the file
    $ cat t.pig
    a = load '$file' as (a0, a1);
    dump a;
    # parameter on commandline gets substituted
    $ java -Xmx500m -classpath pig.jar org.apache.pig.Main -x local -dryrun -p file=x t.pig
    2011-05-31 14:00:24,999 [main] INFO org.apache.pig.Main - Logging error messages to: /Users/tejas/pig_lpgen_2083/trunk/pig_1306875624997.log
    2011-05-31 14:00:25,321 [main] INFO org.apache.pig.Main - Dry run completed. Substituted pig script is at t.pig.substituted
    $ cat t.pig.substituted
    a = load 'x' as (a0, a1);
    dump a;
    # but param in commandline does not get used for explain command, and it fails
    java -Xmx500m -classpath pig.jar org.apache.pig.Main -x local -p file=x -e 'explain -script t.pig;'
    2011-05-31 14:01:07,217 [main] INFO org.apache.pig.Main - Logging error messages to: /Users/tejas/pig_lpgen_2083/trunk/pig_1306875667215.log
    2011-05-31 14:01:07,364 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: file:///
    2011-05-31 14:01:07,547 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2999: Unexpected internal error. Undefined parameter : file
    # parameter gets substituted when specified using %declare statement.
    cat t2.pig
    %declare file x
    a = load '$file' as (a0, a1);
    dump a;
    java -Xmx500m -classpath pig.jar org.apache.pig.Main -x local -p file=x -e 'explain -script t2.pig;'
    ..
    2011-05-31 14:01:44,059 [main] WARN org.apache.pig.tools.grunt.GruntParser - 'dump' statement is ignored while processing 'explain -script' or '-check'
    Logical plan is empty.
    Physical plan is empty.
    Execution plan is empty.
    {code}
    --
    This message is automatically generated by JIRA.
    For more information on JIRA, see: http://www.atlassian.com/software/jira

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriespig, hadoop
postedMay 31, '11 at 9:09p
activeJun 30, '11 at 11:37p
posts4
users1
websitepig.apache.org

1 user in discussion

Thejas M Nair (JIRA): 4 posts

People

Translate

site design / logo © 2022 Grokbase