You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GJL <gi...@git.apache.org> on 2018/02/21 14:31:34 UTC

[GitHub] flink pull request #5545: [FLINK-8718][DataStream] Set maxParallelism on non...

GitHub user GJL opened a pull request:

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

    [FLINK-8718][DataStream] Set maxParallelism on non-parallel DataStreamSource

    ## What is the purpose of the change
    
    *Set maxParallelism to 1 on `org.apache.flink.streaming.api.datastream.DataStreamSource` if the operator is non-parallel.*
    
    cc: @tillrohrmann @bowenli86 @aljoscha 
    
    ## Brief change log
    
      - *Call `forceNonParallel()` if source operator is non-parallel.*
      - *Unit test `DataStreamSource`.*
      
    ## Verifying this change
    
    This change added tests and can be verified as follows:
    
      - *Added unit tests for `DataStreamSource`*
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (yes / **no**)
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (**yes** / no)
      - The serializers: (yes / **no** / don't know)
      - The runtime per-record code paths (performance sensitive): (**yes** / no / don't know)
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
      - The S3 file system connector: (yes / **no** / don't know)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (yes / **no**)
      - If yes, how is the feature documented? (**not applicable** / docs / JavaDocs / not documented)


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

    $ git pull https://github.com/GJL/flink FLINK-8718

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

    https://github.com/apache/flink/pull/5545.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 #5545
    
----
commit 3450c455e8e28bc83858f1c611fe8a648cc8cd97
Author: gyao <ga...@...>
Date:   2018-02-21T14:26:49Z

    [FLINK-8718][DataStream] Set maxParallelism to 1 on non-parallel DataStreamSource

----


---

[GitHub] flink issue #5545: [FLINK-8718][DataStream] Set maxParallelism on non-parall...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the issue:

    https://github.com/apache/flink/pull/5545
  
    Shouldn't it always be possible to merge n key groups into a single key group? Maybe this could be the backwards compatibility path.
    
    Moreover, which sources use keyed state? Don't almost all of the sources use operator state if they are stateful?


---

[GitHub] flink pull request #5545: [FLINK-8718][DataStream] Set maxParallelism on non...

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

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


---

[GitHub] flink issue #5545: [FLINK-8718][DataStream] Set maxParallelism on non-parall...

Posted by StefanRRichter <gi...@git.apache.org>.
Github user StefanRRichter commented on the issue:

    https://github.com/apache/flink/pull/5545
  
    I agree with @aljoscha, there is a sanity check that `maxParallelism` of operators did not change when restoring.


---

[GitHub] flink issue #5545: [FLINK-8718][DataStream] Set maxParallelism on non-parall...

Posted by GJL <gi...@git.apache.org>.
Github user GJL commented on the issue:

    https://github.com/apache/flink/pull/5545
  
    I have test failures, e.g., ` StreamGraphGeneratorTest.testMaxParallelismWithConnectedKeyedStream` 😢 


---

[GitHub] flink issue #5545: [FLINK-8718][DataStream] Set maxParallelism on non-parall...

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

    https://github.com/apache/flink/pull/5545
  
    I'm not sure we can do this change since it breaks compatibility for savepoints because previous versions of Flink hat some `maxParallelism` setting for sources which would be incompatible with the new `maxParallelism` of 1. Thoughts?


---

[GitHub] flink issue #5545: [FLINK-8718][DataStream] Set maxParallelism on non-parall...

Posted by GJL <gi...@git.apache.org>.
Github user GJL commented on the issue:

    https://github.com/apache/flink/pull/5545
  
    The test relies on being able to set setParallelism on a non-parallel source:
    `DataStream<Integer> input1 = env.fromElements(1, 2, 3, 4).setMaxParallelism(128);`


---

[GitHub] flink issue #5545: [FLINK-8718][DataStream] Set maxParallelism on non-parall...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the issue:

    https://github.com/apache/flink/pull/5545
  
    Could that be a faulty test?


---

[GitHub] flink issue #5545: [FLINK-8718][DataStream] Set maxParallelism on non-parall...

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

    https://github.com/apache/flink/pull/5545
  
    Yes, no source can use keyed state. 😄 But the `StateAssignmentOperation` will still fail a restore if the `maxParallelism` of an operator changes. Maybe @StefanRRichter can chime in on that but I think we need to at least touch those parts.


---