pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Graham (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-2663) Expose helpful ScriptState methods
Date Tue, 01 May 2012 01:46:52 GMT

    [ https://issues.apache.org/jira/browse/PIG-2663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13265597#comment-13265597
] 

Bill Graham commented on PIG-2663:
----------------------------------

@Julien I looked some more into moving those methods to MapReduceOper and getAlias is pretty
straightforward but getPigFeature poses more issues.

Currently MapReduceOper has a private OPER_FEATURE enum that it sets internally and uses to
answer a dozen or so isFoo methods (i.e. isSampler isGroupBy). ScriptState.getPigFeature calls
those MapReduceOper.isFoo methods to then map to a package-private PIG_FEATURE enum.

If we moved getPigFeature into MapReduceOper we'd probably want to move PIG_FEATURE with it
and we'd need to make it public. We'd then have a private OPER_FEATURE and a *public* PIG_FEATURE
in the same class, along with a getPigFeature method and a bunch of isFoo methods. I worry
we'd make the MapReduceOper API and it's implementation more confusing, without a significant
refactoring. (Or a counter-argument could be made that it's simplifying because we won't have
feature logic in two class in two packages. Once class gets more confusing, but logic gets
centralized.)

Thoughts?
                
> Expose helpful ScriptState methods
> ----------------------------------
>
>                 Key: PIG-2663
>                 URL: https://issues.apache.org/jira/browse/PIG-2663
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Bill Graham
>            Assignee: Bill Graham
>         Attachments: PIG-2663.1.patch
>
>
> The {{ScriptState.getAlias(MapReduceOper mro)}} and {{ScriptState.getFeature(MapReduceOper
mro)}} methods are useful in implementations of {{PigProgressNotificationListener}}. I'd like
to make them public.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message