You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by gyfora <gi...@git.apache.org> on 2015/06/22 22:19:59 UTC

[GitHub] flink pull request: [FLINK-2261] [streaming] Remove reduce/fold/ag...

GitHub user gyfora opened a pull request:

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

    [FLINK-2261] [streaming] Remove reduce/fold/aggregations from DataStream

    

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

    $ git pull https://github.com/gyfora/flink FLINK-2261

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

    https://github.com/apache/flink/pull/860.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 #860
    
----
commit e9ec12aa3f68fe68c3904f230103a590b66f0e2c
Author: Gyula Fora <gy...@apache.org>
Date:   2015-06-22T19:33:28Z

    [FLINK-2261] [streaming] Remove reduce/fold/aggregations from DataStream

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2261] [streaming] Remove reduce/fold/ag...

Posted by gyfora <gi...@git.apache.org>.
Github user gyfora commented on a diff in the pull request:

    https://github.com/apache/flink/pull/860#discussion_r33385182
  
    --- 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 --
    
    The operators are there because the Grouped versions are subclasses of those. I would not reimplement those as part of this JIRA because they should be handled in a stateful manner.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2261] [streaming] Remove reduce/fold/ag...

Posted by mbalassi <gi...@git.apache.org>.
Github user mbalassi commented on the pull request:

    https://github.com/apache/flink/pull/860#issuecomment-115979208
  
    Ok, seems reasonable.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2261] [streaming] Remove reduce/fold/ag...

Posted by gyfora <gi...@git.apache.org>.
Github user gyfora commented on a diff in the pull request:

    https://github.com/apache/flink/pull/860#discussion_r33134099
  
    --- 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 --
    
    because it is testing the removed StreamFold operator


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2261] [streaming] Remove reduce/fold/ag...

Posted by gyfora <gi...@git.apache.org>.
Github user gyfora commented on the pull request:

    https://github.com/apache/flink/pull/860#issuecomment-115999618
  
    I also added a GroupedDataStream to scala to make the two APIs more inline. 
    I think it is safe to merge now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2261] [streaming] Remove reduce/fold/ag...

Posted by aljoscha <gi...@git.apache.org>.
Github user aljoscha commented on a diff in the pull request:

    https://github.com/apache/flink/pull/860#discussion_r33139196
  
    --- 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 --
    
    But the actual operators are still there.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2261] [streaming] Remove reduce/fold/ag...

Posted by gyfora <gi...@git.apache.org>.
Github user gyfora commented on a diff in the pull request:

    https://github.com/apache/flink/pull/860#discussion_r33386546
  
    --- 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 --
    
    So I would instead add a JIRA to handle the GroupReduce transformations in a stateful way. This can should be thought through for the windowing case.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2261] [streaming] Remove reduce/fold/ag...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2261] [streaming] Remove reduce/fold/ag...

Posted by mbalassi <gi...@git.apache.org>.
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?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2261] [streaming] Remove reduce/fold/ag...

Posted by aljoscha <gi...@git.apache.org>.
Github user aljoscha commented on the pull request:

    https://github.com/apache/flink/pull/860#issuecomment-116000016
  
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2261] [streaming] Remove reduce/fold/ag...

Posted by aljoscha <gi...@git.apache.org>.
Github user aljoscha commented on the pull request:

    https://github.com/apache/flink/pull/860#issuecomment-115976631
  
    I think we can merge this now. And then redo the Grouped Operators later.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---