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

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

GitHub user xccui opened a pull request:

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

    [FLINK-9289] Parallelism of generated operators should have max parallelism 
of input

    ## What is the purpose of the change
    
    This PR aims to fix the default parallelism problem for the generated 
key-extraction mapper whose input is a union operator without parallelism in 
the batch environment.
    
    ## Brief change log
    
      - When creating a `Union` operator, automatically set its parallelism to 
the maximum one of its inputs.
      - Forbid the user to set parallelism for the union operator manually.
      - Add some test cases in `UnionOperatorTest.java` and 
`UnionTranslationTest.java`.
      - Adjust the results for `testUnionWithoutExtended()` and 
`testUnionWithExtended()` in `org.apache.flink.table.api.batch.ExplainTest`.
      - Remove the parallelism setting code for union in 
`PythonPlanBinder.java` and `PageRank.java`.
    
    ## Verifying this change
    
    The change can be verified by the added test cases in 
`UnionOperatorTest.java` and `UnionTranslationTest.java`.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (no)
      - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (no)
      - The serializers: (no)
      - The runtime per-record code paths (performance sensitive): (no)
      - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
      - The S3 file system connector: (no)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (no)
      - If yes, how is the feature documented? (not applicable)


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

    $ git pull https://github.com/xccui/flink FLINK-9289-parallelism

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

    https://github.com/apache/flink/pull/6003.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 #6003
    
----
commit 35be0811ef0a5e6c572d0a60160fa18c3b6afefa
Author: Xingcan Cui <xingcanc@...>
Date:   2018-05-13T12:20:36Z

    [FLINK-9289] Parallelism of generated operators should have max parallism 
of input

----


> Parallelism of generated operators should have max parallism of input
> ---------------------------------------------------------------------
>
>                 Key: FLINK-9289
>                 URL: https://issues.apache.org/jira/browse/FLINK-9289
>             Project: Flink
>          Issue Type: Bug
>          Components: DataSet API
>    Affects Versions: 1.5.0, 1.4.2, 1.6.0
>            Reporter: Fabian Hueske
>            Assignee: Xingcan Cui
>            Priority: Major
>
> The DataSet API aims to chain generated operators such as key extraction 
> mappers to their predecessor. This is done by assigning the same parallelism 
> as the input operator.
> If a generated operator has more than two inputs, the operator cannot be 
> chained anymore and the operator is generated with default parallelism. This 
> can lead to a {code}NoResourceAvailableException: Not enough free slots 
> available to run the job.{code} as reported by a user on the mailing list: 
> https://lists.apache.org/thread.html/60a8bffcce54717b6273bf3de0f43f1940fbb711590f4b90cd666c9a@%3Cuser.flink.apache.org%3E
> I suggest to set the parallelism of a generated operator to the max 
> parallelism of all of its inputs to fix this problem.
> Until the problem is fixed, a workaround is to set the default parallelism at 
> the {{ExecutionEnvironment}}:
> {code}
> ExecutionEnvironment env = ...
> env.setParallelism(2);
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to