beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aljoscha Krettek (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (BEAM-1905) ParDoTranslation should translate a ParDo more simple?
Date Mon, 10 Apr 2017 17:35:41 GMT

     [ https://issues.apache.org/jira/browse/BEAM-1905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Aljoscha Krettek closed BEAM-1905.
----------------------------------
       Resolution: Won't Fix
    Fix Version/s: Not applicable

This was changed in https://github.com/apache/beam/commit/c6cad209faf67b799d8c44c786a0ac9d45fcbbf2
where we made Multi-Output ParDo the only required primitive.

The complicated translation is temporary and will be resolved in BEAM-1498.

Please re-open if you disagree.

> ParDoTranslation should translate a ParDo more simple?
> ------------------------------------------------------
>
>                 Key: BEAM-1905
>                 URL: https://issues.apache.org/jira/browse/BEAM-1905
>             Project: Beam
>          Issue Type: Improvement
>          Components: runner-flink
>            Reporter: huangxiaofeng
>            Assignee: Aljoscha Krettek
>             Fix For: Not applicable
>
>
> now, each Pardo will translate to parDoOperate + select(tag) + flatmap, even if it do'st
have sidelnput, and it just have one output.
> it will make the transformations more complicated.
> for (TaggedPValue output : outputs) {
>         final int outputTag = tagsToLabels.get(output.getTag());
>         TypeInformation outputTypeInfo = context.getTypeInfo((PCollection<?>) output.getValue());
>         @SuppressWarnings("unchecked")
>         DataStream unwrapped = splitStream.select(String.valueOf(outputTag))
>           .flatMap(new FlatMapFunction<RawUnionValue, Object>() {
>             @Override
>             public void flatMap(RawUnionValue value, Collector<Object> out) throws
Exception {
>               out.collect(value.getValue());
>             }
>           }).returns(outputTypeInfo);
>         context.setOutputDataStream(output.getValue(), unwrapped);
>       }



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message