You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by aljoscha <gi...@git.apache.org> on 2016/02/26 15:56:25 UTC

[GitHub] flink pull request: [FLINK-3521] Make Iterable part of method sign...

GitHub user aljoscha opened a pull request:

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

    [FLINK-3521] Make Iterable part of method signature for WindowFunction

    

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

    $ git pull https://github.com/aljoscha/flink window-change-sig

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

    https://github.com/apache/flink/pull/1723.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 #1723
    
----
commit 33b382c8603667b5c625195afba1355410035d15
Author: Aljoscha Krettek <al...@gmail.com>
Date:   2016-02-26T14:19:50Z

    [FLINK-3521] Make Iterable part of method signature for WindowFunction

----


---
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-3521] Make Iterable part of method sign...

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

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


---
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-3521] Make Iterable part of method sign...

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

    https://github.com/apache/flink/pull/1723#issuecomment-189458811
  
    Yes, this is correct. (about the fold() on non-keyed windows)


---
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-3521] Make Iterable part of method sign...

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

    https://github.com/apache/flink/pull/1723#issuecomment-189520303
  
    Merging ...


---
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-3521] Make Iterable part of method sign...

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

    https://github.com/apache/flink/pull/1723#issuecomment-189447041
  
    Looks good, but I need a few more minutes to check this...


---
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-3521] Make Iterable part of method sign...

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

    https://github.com/apache/flink/pull/1723#issuecomment-189459860
  
    I like this, especially the natural Scala path. Some concerns, though:
    
      1. As noted before, the fold function in the non-keyed window is not space constant. That is quite a serious issue, if people count heavy streams in large windows. That should be fixed.
    
      2. The `reduce(...)` code on the `WindowedStream` creates a pass-through window function over Iterable, instead of an pass-through internal window function. The result is that for reduced windows, the single result value is wrapped and unwrapped, instead of simply passed through. That should be a quite simple fix.
    
      3. Minor comment, more for future code, (and that applies to virtually all Scala API code): The code creates function objects in line a lot. As a result, we have for example at least 10 classes that implement a Flink ReduceFunction and call a Scala Function2. I would suggest to define that class once externally (not inline), because it reduces number of subclasses of the reduce function and that may actually have a positive impact on the JIT friendliness of some programs (if the number of loaded implementations of ReduceFunction at any point becomes reasonably small)
    



---
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-3521] Make Iterable part of method sign...

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

    https://github.com/apache/flink/pull/1723#issuecomment-189454876
  
    May be unrelated to this change, but I think `fold()` for non-keyed windows is not incremental, meaning it has no constant space requirement.


---
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-3521] Make Iterable part of method sign...

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

    https://github.com/apache/flink/pull/1723#issuecomment-189465103
  
    Let's merge this and open a follow-up issue for (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-3521] Make Iterable part of method sign...

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

    https://github.com/apache/flink/pull/1723#issuecomment-189463014
  
    1. Is very hard to fix, ditching the non-keyed window operators altogether and using a dummy key selector would be easier.


---
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-3521] Make Iterable part of method sign...

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

    https://github.com/apache/flink/pull/1723#issuecomment-189462738
  
    The `PassThroughFunction` is created because at that point it is not yet clear what type of `InternalWindowFunction` will be created. I can fix it by duplicating all the WindowOperator creation code, but this applies to reduce/fold both on the Java and Scala API.


---
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-3521] Make Iterable part of method sign...

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

    https://github.com/apache/flink/pull/1723#issuecomment-189464956
  
    I think (2) can be done easier if the operator creation code goes into something more generic, but that is not that urgent.


---
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-3521] Make Iterable part of method sign...

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

    https://github.com/apache/flink/pull/1723#discussion_r54291015
  
    --- Diff: flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/function/AllWindowFunction.scala ---
    @@ -0,0 +1,45 @@
    +/*
    + * 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.scala.function
    +
    +import java.io.Serializable
    +
    +import org.apache.flink.annotation.Public
    +import org.apache.flink.api.common.functions.Function
    +import org.apache.flink.streaming.api.windowing.windows.Window
    +import org.apache.flink.util.Collector
    +
    +/**
    +  * Base interface for functions that are evaluated over keyed (grouped) windows.
    --- End diff --
    
    JavaDoc is wrong here


---
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-3521] Make Iterable part of method sign...

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

    https://github.com/apache/flink/pull/1723#issuecomment-189442607
  
    Scrolled over the changes, didn't spot anything suspicious 


---
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.
---