flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject flink git commit: [client] Work around limitations of JDK 1.6 in InetSocketAddress
Date Wed, 22 Apr 2015 12:58:21 GMT
Repository: flink
Updated Branches:
  refs/heads/master 2b8db40ac -> 8fc847e5b


[client] Work around limitations of JDK 1.6 in InetSocketAddress


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/8fc847e5
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/8fc847e5
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/8fc847e5

Branch: refs/heads/master
Commit: 8fc847e5b632c5f311f7a4dfc55204c486283c58
Parents: 2b8db40
Author: Stephan Ewen <sewen@apache.org>
Authored: Wed Apr 22 14:48:22 2015 +0200
Committer: Stephan Ewen <sewen@apache.org>
Committed: Wed Apr 22 14:48:22 2015 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/flink/client/program/Client.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/8fc847e5/flink-clients/src/main/java/org/apache/flink/client/program/Client.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/main/java/org/apache/flink/client/program/Client.java b/flink-clients/src/main/java/org/apache/flink/client/program/Client.java
index c61e814..e219a38 100644
--- a/flink-clients/src/main/java/org/apache/flink/client/program/Client.java
+++ b/flink-clients/src/main/java/org/apache/flink/client/program/Client.java
@@ -114,7 +114,11 @@ public class Client {
 		
 		if (jobManagerAddress.isUnresolved()) {
 			// address is unresolved, resolve it
-			String host = jobManagerAddress.getHostString();
+			String host = jobManagerAddress.getHostName();
+			if (host == null) {
+				throw new IllegalArgumentException("Host in jobManagerAddress is null");
+			}
+			
 			try {
 				InetAddress address = InetAddress.getByName(host);
 				this.jobManagerAddress = new InetSocketAddress(address, jobManagerAddress.getPort());


Mime
View raw message