You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Markus Holzemer (JIRA)" <ji...@apache.org> on 2014/06/30 12:16:25 UTC

[jira] [Commented] (FLINK-573) Clean-up MapOperators in optimizer

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

Markus Holzemer commented on FLINK-573:
---------------------------------------

In the current version it look like this:
{code:java}
			else if (c instanceof MapOperatorBase) {
				n = new MapNode((MapOperatorBase<?, ?, ?>) c);
			}
			else if (c instanceof CollectorMapOperatorBase) {
				n = new CollectorMapNode((CollectorMapOperatorBase<?, ?, ?>) c);
			}
			else if (c instanceof FlatMapOperatorBase) {
				n = new FlatMapNode((FlatMapOperatorBase<?, ?, ?>) c);
			}
{code}
In my opinion this is clean enough, what do you think? As long as the old record API is still around it would be hard to remove to old CollectorMap.

> Clean-up MapOperators in optimizer
> ----------------------------------
>
>                 Key: FLINK-573
>                 URL: https://issues.apache.org/jira/browse/FLINK-573
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: GitHub Import
>              Labels: github-import
>             Fix For: pre-apache
>
>
> This issue continues a discussion started by @aljoscha  in PR ([#544|https://github.com/stratosphere/stratosphere/issues/544] | [FLINK-544|https://issues.apache.org/jira/browse/FLINK-544]).
> MapNode is responsible for PlainMapOperatorBase and not for
> MapOperatorBase, but this is a mess right now.
> Maybe we should think about cleaning the situation a bit. CollectorMap is the same as FlatMap, only the function in the interface is called map instead of flatMap. I know that this is because of historic reasons but it is still a mess because we handle all three types through the layers. For example, some code in PactCompiler looks like this:
> ```java
> else if (c instanceof MapOperatorBase) {
> 	n = new CollectorMapNode((MapOperatorBase<?>) c);
> }
> else if (c instanceof PlainMapOperatorBase) {
> 	n = new MapNode((PlainMapOperatorBase<?>) c);
> }
> else if (c instanceof FlatMapOperatorBase) {
> 	n = new FlatMapNode((FlatMapOperatorBase<?>) c);
> }
> ```
> ---------------- Imported from GitHub ----------------
> Url: https://github.com/stratosphere/stratosphere/issues/573
> Created by: [fhueske|https://github.com/fhueske]
> Labels: enhancement, optimizer, 
> Created at: Fri Mar 14 02:11:22 CET 2014
> State: open



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