You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by Thejas Nair <te...@yahoo-inc.com> on 2009/03/07 00:14:53 UTC
scope string in OperatorKey
What is the purpose of scope string in org.apache.pig.impl.plan.OperatorKey
?Is it meant to be used if we have a pig deamon process ?
Is it ok to stop printing the scope part in explain output? It does not seem
to add value to it and makes the output more verbose.
Thanks,
Thejas
Re: scope string in OperatorKey
Posted by Thejas Nair <te...@yahoo-inc.com>.
The id in OperatorKey helps distinguish between multiple operators of same
type.
What I am proposing is just changing the toString() in OperatorKey to make
the explain output more readable, (we can change it back later or look at
other options, if any future requirements make printing of scope necessary).
Ie
public String toString() {
return scope + "-" + id;
}
Changes to
public String toString() {
return ((Integer(id)).toString();
}
Thanks,
Thejas
On 3/11/09 10:55 AM, "Alan Gates" <ga...@yahoo-inc.com> wrote:
> The purpose of the scope string is to allow us to have multiple
> sessions of pig running and distinguish the operators. It's one of
> those things that was put in before an actual requirement, so whether
> it will prove useful or not remains to be seen.
>
> As for removing it from explain, is it still reasonably easy to
> distinguish operators without it? IIRC the OperatorKey includes an
> operator number. When looking at the explain plans this is useful for
> cases where there is more than one of a given type of operator and you
> want to be able to distinguish between them.
>
> Alan.
>
> On Mar 6, 2009, at 3:14 PM, Thejas Nair wrote:
>
>> What is the purpose of scope string in
>> org.apache.pig.impl.plan.OperatorKey
>> ?Is it meant to be used if we have a pig deamon process ?
>>
>> Is it ok to stop printing the scope part in explain output? It does
>> not seem
>> to add value to it and makes the output more verbose.
>>
>> Thanks,
>> Thejas
>>
>
Re: scope string in OperatorKey
Posted by Alan Gates <ga...@yahoo-inc.com>.
The purpose of the scope string is to allow us to have multiple
sessions of pig running and distinguish the operators. It's one of
those things that was put in before an actual requirement, so whether
it will prove useful or not remains to be seen.
As for removing it from explain, is it still reasonably easy to
distinguish operators without it? IIRC the OperatorKey includes an
operator number. When looking at the explain plans this is useful for
cases where there is more than one of a given type of operator and you
want to be able to distinguish between them.
Alan.
On Mar 6, 2009, at 3:14 PM, Thejas Nair wrote:
> What is the purpose of scope string in
> org.apache.pig.impl.plan.OperatorKey
> ?Is it meant to be used if we have a pig deamon process ?
>
> Is it ok to stop printing the scope part in explain output? It does
> not seem
> to add value to it and makes the output more verbose.
>
> Thanks,
> Thejas
>