flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-7334) Replace Flink's futures by CompletableFuture in RpcGateway
Date Wed, 02 Aug 2017 16:44:00 GMT

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

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

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4462#discussion_r130930461
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/rpc/TestingRpcService.java
---
    @@ -92,20 +92,19 @@ public void registerGateway(String address, RpcGateway gateway) {
     	}
     
     	@Override
    -	public <C extends RpcGateway> Future<C> connect(String address, Class<C>
clazz) {
    +	public <C extends RpcGateway> CompletableFuture<C> connect(String address,
Class<C> clazz) {
     		RpcGateway gateway = registeredConnections.get(address);
     
     		if (gateway != null) {
     			if (clazz.isAssignableFrom(gateway.getClass())) {
     				@SuppressWarnings("unchecked")
     				C typedGateway = (C) gateway;
    -				return FlinkCompletableFuture.completed(typedGateway);
    +				return CompletableFuture.completedFuture(typedGateway);
     			} else {
    -				return FlinkCompletableFuture.completedExceptionally(
    -					new Exception("Gateway registered under " + address + " is not of type " + clazz));
    +				return FutureUtils.completedExceptionally(new Exception("Gateway registered under
" + address + " is not of type " + clazz));
     			}
     		} else {
    -			return FlinkCompletableFuture.completedExceptionally(new Exception("No gateway registered
under that name"));
    +			return FutureUtils.completedExceptionally(new Exception("No gateway registered under
that name"));
    --- End diff --
    
    True. Will add it.


> Replace Flink's futures by CompletableFuture in RpcGateway
> ----------------------------------------------------------
>
>                 Key: FLINK-7334
>                 URL: https://issues.apache.org/jira/browse/FLINK-7334
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Distributed Coordination
>    Affects Versions: 1.4.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>             Fix For: 1.4.0
>
>




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

Mime
View raw message