You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/03 16:06:59 UTC

[jira] [Commented] (FLINK-4016) FoldApplyWindowFunction is not properly initialized

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

ASF GitHub Bot commented on FLINK-4016:
---------------------------------------

GitHub user rvdwenden opened a pull request:

    https://github.com/apache/flink/pull/2070

    [FLINK-4016] initialize FoldApplyWindowFunction properly

    
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rvdwenden/flink master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2070.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2070
    
----
commit ec5eb4890201d6d0c9d91510f3b078a681d5a317
Author: rvdwenden <rv...@gmail.com>
Date:   2016-06-03T15:49:03Z

    [FLINK-4016] initialize FoldApplyWindowFunction properly

----


> FoldApplyWindowFunction is not properly initialized
> ---------------------------------------------------
>
>                 Key: FLINK-4016
>                 URL: https://issues.apache.org/jira/browse/FLINK-4016
>             Project: Flink
>          Issue Type: Bug
>          Components: DataStream API
>    Affects Versions: 1.0.3
>            Reporter: RWenden
>            Priority: Blocker
>              Labels: easyfix
>             Fix For: 1.1.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> FoldApplyWindowFunction's outputtype is not set.
> We're using constructions like (excerpt):
>       .keyBy(0)
>       .countWindow(10, 5)
>       .fold(...)
> Running this stream gives an runtime exception in FoldApplyWindowFunction:
> "No initial value was serialized for the fold window function. Probably the setOutputType method was not called."
> This can be easily fixed in WindowedStream.java by (around line# 449):
>             FoldApplyWindowFunction foldApplyWindowFunction = new FoldApplyWindowFunction<>(initialValue, foldFunction, function);
>             foldApplyWindowFunction.setOutputType(resultType, input.getExecutionConfig());
>             operator = new EvictingWindowOperator<>(windowAssigner,
>                     windowAssigner.getWindowSerializer(getExecutionEnvironment().getConfig()),
>                     keySel,
>                     input.getKeyType().createSerializer(getExecutionEnvironment().getConfig()),
>                     stateDesc,
>                     new InternalIterableWindowFunction<>(foldApplyWindowFunction),
>                     trigger,
>                     evictor);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)