You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Andrzej Bialecki (JIRA)" <ji...@apache.org> on 2007/11/03 16:40:50 UTC

[jira] Created: (PIG-21) Show more details about the current execution context

Show more details about the current execution context
-----------------------------------------------------

                 Key: PIG-21
                 URL: https://issues.apache.org/jira/browse/PIG-21
             Project: Pig
          Issue Type: Improvement
          Components: grunt
    Affects Versions: 0.1.0
            Reporter: Andrzej Bialecki 
            Priority: Minor
             Fix For: 0.1.0


After a long interactive session with grunt I lost track of what kind of queries I defined, and then re-defined. It would be nice to have the ability to show all defined aliases, and other context variables, such as the filesystem, jobTracker, user jars and Configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-21) Show more details about the current execution context

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540269 ] 

Olga Natkovich commented on PIG-21:
-----------------------------------

Hi Andrzej,

Thanks for contributing! This set of commands is very useful and in fact we had users asking for some of them.

I applied your patch and played a little bit with the commands and they work well and the code looks good. I found a couple of things that don't seem quite right:

(1) show env does not seem to show the URL for the job tracker which is my understanding of what you were trying to do. Instead it shows name of the class.
(2) It would be nice if show aliases showed them in the order of definition or dependency order.
(3) In show aliases, if you redefine the alias, it shows twice and it is hard to tell which one is the latest one.

Points (2) and (3) can be demonstrated with the following pig script:

A = load 'myfile' using PigStorage();
A = load 'myfile' using PigStorage() as (a,b,c);
B = filter A by b > '25';
C = group B by a;
D = for each C generate flatten(group), B;

show aliases;

> Show more details about the current execution context
> -----------------------------------------------------
>
>                 Key: PIG-21
>                 URL: https://issues.apache.org/jira/browse/PIG-21
>             Project: Pig
>          Issue Type: Improvement
>          Components: grunt
>    Affects Versions: 0.1.0
>            Reporter: Andrzej Bialecki 
>            Priority: Minor
>             Fix For: 0.1.0
>
>         Attachments: context.patch
>
>
> After a long interactive session with grunt I lost track of what kind of queries I defined, and then re-defined. It would be nice to have the ability to show all defined aliases, and other context variables, such as the filesystem, jobTracker, user jars and Configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-21) Show more details about the current execution context

Posted by "Andrzej Bialecki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542881 ] 

Andrzej Bialecki  commented on PIG-21:
--------------------------------------

The problem with JobTracker URL can be solved by the following snippet:

			if (ctx.getExecType() == ExecType.MAPREDUCE)
				System.out.println("Job tracker: " + JobTracker.getAddress(ctx.getConf()));

However, I'm not sure how to solve the other issues that you pointed out, I still know too little about Pig internals ... There are no obvious places in PigServer or PigContext that could provide this information - in case of (2) my understanding is that the dependency order is determined just prior to store(), using IntermedResult.compile(), so I don't think it's possible to show this dependency order without specifying which alias we want to store.

In case of (3), I think this is a problem with IntermedResult.lp.getSchema(), which retains the original alias that it was assigned to (or maybe I'm totally confused ...).

So, for now I'm not able to fix these issues.

> Show more details about the current execution context
> -----------------------------------------------------
>
>                 Key: PIG-21
>                 URL: https://issues.apache.org/jira/browse/PIG-21
>             Project: Pig
>          Issue Type: Improvement
>          Components: grunt
>    Affects Versions: 0.1.0
>            Reporter: Andrzej Bialecki 
>            Priority: Minor
>             Fix For: 0.1.0
>
>         Attachments: context.patch
>
>
> After a long interactive session with grunt I lost track of what kind of queries I defined, and then re-defined. It would be nice to have the ability to show all defined aliases, and other context variables, such as the filesystem, jobTracker, user jars and Configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-21) Show more details about the current execution context

Posted by "Andrzej Bialecki (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-21?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrzej Bialecki  updated PIG-21:
---------------------------------

    Attachment: context.patch

This patch adds a few grunt commands:

show aliases - shows all defined aliases
show plans - shows how aliases will be executed
show env - shows some info about the environment
show conf - shows the current Configuration, sorted by property name

> Show more details about the current execution context
> -----------------------------------------------------
>
>                 Key: PIG-21
>                 URL: https://issues.apache.org/jira/browse/PIG-21
>             Project: Pig
>          Issue Type: Improvement
>          Components: grunt
>    Affects Versions: 0.1.0
>            Reporter: Andrzej Bialecki 
>            Priority: Minor
>             Fix For: 0.1.0
>
>         Attachments: context.patch
>
>
> After a long interactive session with grunt I lost track of what kind of queries I defined, and then re-defined. It would be nice to have the ability to show all defined aliases, and other context variables, such as the filesystem, jobTracker, user jars and Configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.