You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tillrohrmann <gi...@git.apache.org> on 2017/02/14 19:45:30 UTC

[GitHub] flink pull request #3311: Let RpcService.scheduleRunnable return a Scheduled...

GitHub user tillrohrmann opened a pull request:

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

    Let RpcService.scheduleRunnable return a ScheduledFuture

    This PR is based #3310.
    
    The returned ScheduledFuture instance allows to cancel a scheduled runnable and obtain
    the delay until the runnable will be executed. Furthermore, it allows to wait on the
    completion of the runnable.

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

    $ git pull https://github.com/tillrohrmann/flink generalizeRpcServiceScheduleMethod

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

    https://github.com/apache/flink/pull/3311.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 #3311
    
----
commit 639edf235ffee924e0fba56313cb51f825e3a46d
Author: Till Rohrmann <tr...@apache.org>
Date:   2017-02-14T15:50:43Z

    [FLINK-5798] [rpc] Let the RpcService provide a ScheduledExecutorService
    
    This PR adds the getScheduledExecutorService method to the RpcService interface. So
    henceforth all RpcService implementations have to provide a ScheduledExecutorService
    implementation.
    
    Currently, we only support the AkkaRpcService. The AkkaRpcService returns a
    ScheduledExecutorService proxy which forwards the schedule calls to the ActorSystem's
    internal scheduler.

commit 4c58378372867c43ce4d65fa51d609cbb4a95587
Author: Till Rohrmann <tr...@apache.org>
Date:   2017-02-14T19:40:30Z

    [FLINK-5799] [rpc] Let RpcService.scheduleRunnable return a ScheduledFuture
    
    The returned ScheduledFuture instance allows to cancel a scheduled runnable and obtain
    the delay until the runnable will be executed. Furthermore, it allows to wait on the
    completion of the runnable.

----


---
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 #3311: [FLINK-5799] Let RpcService.scheduleRunnable return a Sch...

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

    https://github.com/apache/flink/pull/3311
  
    I've introduce the `ScheduleExecutor` interface which extends the `Executor` interface with the `schedule` methods but not the service control methods of the `ScheduledExecutorService` interface.


---
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 #3311: Let RpcService.scheduleRunnable return a ScheduledFuture

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

    https://github.com/apache/flink/pull/3311
  
    Cool change, good to merge from my side.
    
    As an optional thought: We could probably expose a lightweight `Scheduler` interface rather than the `ScheduledExecutorService`, given that quite some methods are not available. That `Scheduler` interface might be easier to wrap around akka's scheduler as well.


---
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 #3311: [FLINK-5799] Let RpcService.scheduleRunnable return a Sch...

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

    https://github.com/apache/flink/pull/3311
  
    Thanks for the review @StephanEwen. Merging this PR.


---
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 #3311: [FLINK-5799] Let RpcService.scheduleRunnable return a Sch...

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

    https://github.com/apache/flink/pull/3311
  
    Thanks for the review @StephanEwen.
    
    You mean something like the `Executor` interface with the additional methods for the scheduled execution. Differently said, removing the `Service` methods like `shutdown`, `shutdownNow` and `awaitTermination` from the interface? 
    
    That is a good idea. If we should stumble across the problem that a component needs an actual `ScheduledExecutorService` implementation, then we can still have a wrapper which throws an `UnsupportedOperationException` when calling the respective methods. I will adapt the PR in that way.


---
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 #3311: [FLINK-5799] Let RpcService.scheduleRunnable retur...

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

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


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