flink-issues mailing list archives

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

    https://github.com/apache/flink/pull/4450#discussion_r130577645
  
    --- 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'm a bit confused. I mean the change looks good in and of itself, but I have a hard time
understanding how we can make this change in isolation without touching other parts at the
same time.


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