incubator-crunch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Friedrich (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CRUNCH-59) DoFn doesnt' need both configure and initialize methods
Date Mon, 10 Sep 2012 06:06:08 GMT

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

Matthias Friedrich commented on CRUNCH-59:
------------------------------------------

I think in the long run, we should move from Hadoop-style Template Method APIs to Java-EE-style
Strategy interfaces where Configuration and other infrastructure could be passed in via dependency
injection. Startup/finish shouldn't be part of the interface at all, instead, we could make
the interface flexible and evolvable like Java EE does via method annotations (@Startup, @Finish,
etc.).

In the end, DoFn (and MapFn, FilterFn) would only have one method which is, as far as I know,
a requirement for using Lambda expressions from Java 8. In the end, client code could look
as concise as Scala code.


                
> DoFn doesnt' need both configure and initialize methods
> -------------------------------------------------------
>
>                 Key: CRUNCH-59
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-59
>             Project: Crunch
>          Issue Type: Bug
>            Reporter: Vinod Kumar Vavilapalli
>
> DoFN doesn't seem to need both {{public void configure(Configuration conf)}} and {{public
void initialize()}}. We can do with a single API like {{initialize(Configuration)}}.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message