flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2261) Remove reduce/aggregation from DataStream
Date Wed, 24 Jun 2015 08:50:04 GMT

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

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

Github user mbalassi commented on a diff in the pull request:

    https://github.com/apache/flink/pull/860#discussion_r33128501
  
    --- Diff: flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/operators/StreamFoldTest.java
---
    @@ -1,57 +0,0 @@
    -/*
    - * Licensed to the Apache Software Foundation (ASF) under one or more
    - * contributor license agreements.  See the NOTICE file distributed with
    - * this work for additional information regarding copyright ownership.
    - * The ASF licenses this file to You under the Apache License, Version 2.0
    - * (the "License"); you may not use this file except in compliance with
    - * the License.  You may obtain a copy of the License at
    - *
    - *    http://www.apache.org/licenses/LICENSE-2.0
    - *
    - * Unless required by applicable law or agreed to in writing, software
    - * distributed under the License is distributed on an "AS IS" BASIS,
    - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    - * See the License for the specific language governing permissions and
    - * limitations under the License.
    - */
    -
    -package org.apache.flink.streaming.api.operators;
    -
    -import static org.junit.Assert.assertEquals;
    -
    -import java.util.Arrays;
    -import java.util.List;
    -
    -import org.apache.flink.api.common.functions.FoldFunction;
    -import org.apache.flink.api.common.typeinfo.TypeInformation;
    -import org.apache.flink.api.java.typeutils.TypeExtractor;
    -import org.apache.flink.streaming.api.operators.StreamFold;
    -import org.apache.flink.streaming.util.MockContext;
    -import org.junit.Test;
    -
    -public class StreamFoldTest {
    -
    -	private static class MyFolder implements FoldFunction<Integer, String> {
    -
    -		private static final long serialVersionUID = 1L;
    -
    -		@Override
    -		public String fold(String accumulator, Integer value) throws Exception {
    -			return accumulator + value.toString();
    --- End diff --
    
    Why remove these?


> Remove reduce/aggregation from DataStream
> -----------------------------------------
>
>                 Key: FLINK-2261
>                 URL: https://issues.apache.org/jira/browse/FLINK-2261
>             Project: Flink
>          Issue Type: Improvement
>          Components: Java API, Scala API, Streaming
>    Affects Versions: 0.10
>            Reporter: Gyula Fora
>            Assignee: Gyula Fora
>
> Currently we have reduce and aggregation methods for non-grouped DataStreams as well,
which will produce local aggregates depending on the parallelism of the operator.
> This behaviour is neither intuitive nor useful as it only produces sensible results if
the user specifically sets the parallelism to 1 which should not be encouraged. 
> I would like to remove these methods from the DataStream api and only keep it for GroupedDataStreams
and WindowedDataStream where the aggregation is either executed per-key or per-window.



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

Mime
View raw message