You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2019/02/21 09:19:21 UTC
[flink] branch master updated: [FLINK-11699] Use isEmpty() for
address comparison in AbstractDispatcherResourceManagerComponentFactory
This is an automated email from the ASF dual-hosted git repository.
trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 60f204b [FLINK-11699] Use isEmpty() for address comparison in AbstractDispatcherResourceManagerComponentFactory
60f204b is described below
commit 60f204bf67e348dacc79136e754f7b22e835737c
Author: Benchao Li <li...@gmail.com>
AuthorDate: Thu Feb 21 10:36:37 2019 +0800
[FLINK-11699] Use isEmpty() for address comparison in AbstractDispatcherResourceManagerComponentFactory
This closes #7783.
---
.../component/AbstractDispatcherResourceManagerComponentFactory.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/component/AbstractDispatcherResourceManagerComponentFactory.java b/flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/component/AbstractDispatcherResourceManagerComponentFactory.java
index 81138ae..34923c6 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/component/AbstractDispatcherResourceManagerComponentFactory.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/component/AbstractDispatcherResourceManagerComponentFactory.java
@@ -260,7 +260,7 @@ public abstract class AbstractDispatcherResourceManagerComponentFactory<T extend
protected String getHostname(RpcService rpcService) {
final String rpcServiceAddress = rpcService.getAddress();
- return rpcServiceAddress == "" ? "localhost" : rpcServiceAddress;
+ return rpcServiceAddress != null && rpcServiceAddress.isEmpty() ? "localhost" : rpcServiceAddress;
}
protected abstract DispatcherResourceManagerComponent<T> createDispatcherResourceManagerComponent(