flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #4450: [FLINK-7336] [futures] Replace Flink's future with...
Date Tue, 01 Aug 2017 21:31:13 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4450#discussion_r130734078
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActor.java
---
    @@ -209,24 +207,20 @@ private void handleRpcInvocation(RpcInvocation rpcInvocation) {
     						return;
     					}
     
    -					if (result instanceof Future) {
    -						final Future<?> future = (Future<?>) result;
    -
    -						// pipe result to sender
    -						if (future instanceof FlinkFuture) {
    -							// FlinkFutures are currently backed by Scala's futures
    -							FlinkFuture<?> flinkFuture = (FlinkFuture<?>) future;
    -
    -							Patterns.pipe(flinkFuture.getScalaFuture(), getContext().dispatcher()).to(getSender());
    -						} else {
    -							// We have to unpack the Flink future and pack it into a Scala future
    -							Patterns.pipe(Futures.future(new Callable<Object>() {
    -								@Override
    -								public Object call() throws Exception {
    -									return future.get();
    +					if (result instanceof CompletableFuture) {
    --- End diff --
    
    I think you're right @zentol. These changes only make sense in combination with the changes
to the `RpcGateway` and `RpcEndpoint` I'm currently working on.


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

Mime
View raw message