You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Timo Walther (JIRA)" <ji...@apache.org> on 2014/06/24 15:03:24 UTC

[jira] [Commented] (FLINK-701) Change new Java API functions to SAMs

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

Timo Walther commented on FLINK-701:
------------------------------------

I started to adapt the TypeExtractor to extract the types from "GenericMap", "GenericReduce" etc. instead of the abstract classes. However, these interfaces extend the interface "Function" which declares open(),close(),get/setRuntimeContext(). There is no interface which is a valid SAM at the moment.

How do we plan to refactor those interfaces?

> Change new Java API functions to SAMs
> -------------------------------------
>
>                 Key: FLINK-701
>                 URL: https://issues.apache.org/jira/browse/FLINK-701
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: GitHub Import
>              Labels: github-import
>             Fix For: pre-apache
>
>
> In order to support a compact syntax with Java 8 Lambdas, we would need to change the types of the functions to Single Abstract Method types (SAMs). Only those can be implemented by Lambdas.
> That means that DataSet.map(MapFunction) would accept an interface MapFunction, not the abstract class that we use now. Many UDFs would not inherit form `AbstractFunction` any more. The inheritance from AbstractFunction would be optional, if life cycle methods (open / close) and runtime contexts are needed.
> This may have also implications on the type extraction, as the generic parameters are in generic superinterfaces, rather than in generic superclasses.
> ---------------- Imported from GitHub ----------------
> Url: https://github.com/stratosphere/stratosphere/issues/701
> Created by: [StephanEwen|https://github.com/StephanEwen]
> Labels: enhancement, java api, user satisfaction, 
> Milestone: Release 0.6 (unplanned)
> Created at: Thu Apr 17 13:06:40 CEST 2014
> State: open



--
This message was sent by Atlassian JIRA
(v6.2#6252)