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

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

GitHub user shuai-xu opened a pull request:

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

    [FLINK-7870] [runtime] Cancel slot allocation to RM when requestSlot timed 
out in SlotPool

    
    ## What is the purpose of the change
    
    This pull request add a cancelSlotRequest rpc protocol between slot pool 
and resource manager. When the pending request timeout in slot pool, it send a 
cancelSlotRequest rpc to resouce manager to canel the previous slot request in 
order not to make the slot request become more and more in resource manager.
    
    ## Verifying this change
    This change added tests and can be verified as follows:
      - *Added a verify in SlotManagerTest to make sure the cancel logic
    
    ## 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)
    
    ## 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/shuai-xu/flink jira-xxxx

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

    https://github.com/apache/flink/pull/4887.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 #4887
    
----
commit daf7fd5745659d94f5a84f669bc90b82b5e69e5e
Author: shuai.xus <shuai....@alibaba-inc.com>
Date:   2017-10-17T09:57:18Z

    [FLINK-xxxx] slot pool cancel slot request to resource manager if timeout
    
    Summary: slot pool cancel slot request to resource manager if timeout
    
    Test Plan: unit test
    
    Reviewers: haitao.w
    
    Differential Revision: https://aone.alibaba-inc.com/code/D320749

commit 96f80187bb5ef1c268a62bdaf80151a70a04b002
Author: shuai.xus <shuai....@alibaba-inc.com>
Date:   2017-10-19T04:13:01Z

    add more contract

----


> SlotPool should cancel the slot request to RM if not need any more.
> -------------------------------------------------------------------
>
>                 Key: FLINK-7870
>                 URL: https://issues.apache.org/jira/browse/FLINK-7870
>             Project: Flink
>          Issue Type: Bug
>          Components: Cluster Management
>            Reporter: shuai.xu
>            Assignee: shuai.xu
>              Labels: flip-6
>
> 1. SlotPool will request slot to rm if its slots are not enough.
> 2. If a slot request is not fulfilled in a certain time, SlotPool will treat 
> the request as timeout and send a new slot request by triggering a failover 
> in JobMaster, the previous request is not needed any more, but rm does not 
> know it.
> 3. This may cause the rm request much more resource than the job really need.
> For example:
> 1. A job need 100 slots. RM request 100 container to YARN.
> 2. But YARN is busy now, it has no resource for the job.
> 3. The job failover as the resource request not fulfilled in time.
> 4. It ask 100 slots again, now RM request 200 container to YARN.
> 5. If failover server time, the containers request  will become more and more.
> 6. Now YARN has resource, it will find that the job may need thousands of 
> containers. This is a waste of resources.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to