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 2018/01/26 14:41:38 UTC

[12/16] flink git commit: [hotfix] Unify argument validation in RestClusterClient

[hotfix] Unify argument validation in RestClusterClient


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

Branch: refs/heads/master
Commit: c5abf5616c96cfaeda9084454f7c674872e05ad0
Parents: c08b9c8
Author: gyao <ga...@data-artisans.com>
Authored: Mon Jan 15 13:55:05 2018 +0100
Committer: Till Rohrmann <tr...@apache.org>
Committed: Fri Jan 26 13:50:23 2018 +0100

----------------------------------------------------------------------
 .../org/apache/flink/client/program/rest/RestClusterClient.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/c5abf561/flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java b/flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
index 30a8584..348e647 100644
--- a/flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
+++ b/flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
@@ -85,8 +85,6 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
-import static java.util.Objects.requireNonNull;
-
 /**
  * A {@link ClusterClient} implementation that communicates via HTTP REST requests.
  */
@@ -97,6 +95,7 @@ public class RestClusterClient<T> extends ClusterClient<T> {
 	private final RestClient restClient;
 
 	private final ExecutorService executorService = Executors.newFixedThreadPool(4, new ExecutorThreadFactory("Flink-RestClusterClient-IO"));
+
 	private final WaitStrategy waitStrategy;
 
 	private final T clusterId;
@@ -113,7 +112,7 @@ public class RestClusterClient<T> extends ClusterClient<T> {
 		super(configuration);
 		this.restClusterClientConfiguration = RestClusterClientConfiguration.fromConfiguration(configuration);
 		this.restClient = new RestClient(restClusterClientConfiguration.getRestClientConfiguration(), executorService);
-		this.waitStrategy = requireNonNull(waitStrategy);
+		this.waitStrategy = Preconditions.checkNotNull(waitStrategy);
 		this.clusterId = Preconditions.checkNotNull(clusterId);
 	}