You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by summerleafs <gi...@git.apache.org> on 2017/07/19 16:21:26 UTC

[GitHub] flink pull request #4369: [Flink-7218] [JobManager] ExecutionVertex.getPrefe...

GitHub user summerleafs opened a pull request:

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

    [Flink-7218] [JobManager] ExecutionVertex.getPreferredLocationsBasedOnInputs() will always return empty

    I really like the new PR template, so i use it instead of the default one on github~
    
    ## What is the purpose of the change
    
    The ExecutionVertex.getPreferredLocationsBasedOnInputs will always return empty, cause `sourceSlot` always be null until `ExectionVertex` has been deployed via 'Execution.deployToSlot()'. So allocate resource base on preferred location can't work correctly, we need to set the slot info for `Execution` as soon as Execution.allocateSlotForExecution() called successfully.
    
    ## Brief change log
    - Added a field `assignedFutureSlot` in `Execution` to record the `Future<SimpleSlot>` as soon as  `Execution.allocateSlotForExecution()` called successfully. And the `assignedFutureSlot`  will be used in `ExectionVertex. getPreferredLocationsBasedOnInputs ()` to get ExecutionVertex's preferred locations.
    
    ## Verifying this change
    
    This change added tests and can be verified as follows:
    - The test case is under ExecutionGraphSchedulingTest. testExecutionVertexGetPreferredLocationsBasedOnInputs(), i have simulated the process of the JobGraph deployment and validated the results in this test case.
    
    ## 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: **(don't know)**
      - The runtime per-record code paths (performance sensitive): **(no)**
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: **(yes)**:
    
    ## Documentation
      - Does this pull request introduce a new feature? **(no)**


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

    $ git pull https://github.com/summerleafs/flink FLINK-7218

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

    https://github.com/apache/flink/pull/4369.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 #4369
    
----
commit 3573b0f306071f53b31f272ba97eb36593318365
Author: summerleafs <su...@163.com>
Date:   2017-07-18T17:43:01Z

    Fix #FLINK-7218: add test for ExecutionVertex.getPreferdLocationBaseOnInputs() method.

commit 29fe921552c232becb885d4f9eb454e15ded3eab
Author: summerleafs <su...@163.com>
Date:   2017-07-19T14:02:53Z

    Add test case for #FLINK-7218.

----


---
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 #4369: [Flink-7218] [JobManager] ExecutionVertex.getPrefe...

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

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


---

[GitHub] flink issue #4369: [Flink-7218] [JobManager] ExecutionVertex.getPreferredLoc...

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

    https://github.com/apache/flink/pull/4369
  
    Hi @summerleafs!
    
    I think we cannot use this approach to fix this. The most important thing is that this introduces a blocking operation (`.get()` on the future) in the call, which will make the while `schedueEager()` call block. Since the ExecutionGraph runs in an actor-style context, methods must never block. Everything must be implemented with future completion functions. 


---
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 issue #4369: [Flink-7218] [JobManager] ExecutionVertex.getPreferredLoc...

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

    https://github.com/apache/flink/pull/4369
  
    Hi @StephanEwen , i changed the code with the thinking described above. Please help me review it again. Thanks a lot.


---
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 issue #4369: [Flink-7218] [JobManager] ExecutionVertex.getPreferredLoc...

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

    https://github.com/apache/flink/pull/4369
  
    duplicate with FLINK-7866.


---

[GitHub] flink issue #4369: [Flink-7218] [JobManager] ExecutionVertex.getPreferredLoc...

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

    https://github.com/apache/flink/pull/4369
  
    @StephanEwen You are right, i think we should fix this in `Scheduler.allocateSlot`. If the `ret` from the `scheduleTask` is an SimpleSlot  then we record it in `Execution`, how do you think?


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