The id in OperatorKey helps distinguish between multiple operators of same
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).

    public String toString() {

      return scope + "-" + id;

Changes to
    public String toString() {

      return ((Integer(id)).toString();



On 3/11/09 10:55 AM, "Alan Gates" <> 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

Reply via email to