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/03/02 07:53:08 UTC
[08/12] flink git commit: [hotfix] Correct shutdown order of
RestClusterClient
[hotfix] Correct shutdown order of RestClusterClient
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/dabefa84
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/dabefa84
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/dabefa84
Branch: refs/heads/master
Commit: dabefa84bedb3abbc28dcf3cec6a1bf76bff6a28
Parents: b007d30
Author: Till Rohrmann <tr...@apache.org>
Authored: Thu Mar 1 18:21:19 2018 +0100
Committer: Till Rohrmann <tr...@apache.org>
Committed: Fri Mar 2 08:52:34 2018 +0100
----------------------------------------------------------------------
.../flink/client/program/rest/RestClusterClient.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/dabefa84/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 9833296..976f2a4 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
@@ -192,13 +192,6 @@ public class RestClusterClient<T> extends ClusterClient<T> {
@Override
public void shutdown() {
- try {
- // we only call this for legacy reasons to shutdown components that are started in the ClusterClient constructor
- super.shutdown();
- } catch (Exception e) {
- log.error("An error occurred during the client shutdown.", e);
- }
-
ExecutorUtils.gracefulShutdown(restClusterClientConfiguration.getRetryDelay(), TimeUnit.MILLISECONDS, retryExecutorService);
this.restClient.shutdown(Time.seconds(5));
@@ -215,6 +208,13 @@ public class RestClusterClient<T> extends ClusterClient<T> {
} catch (Exception e) {
log.error("An error occurred during stopping the dispatcherLeaderRetriever", e);
}
+
+ try {
+ // we only call this for legacy reasons to shutdown components that are started in the ClusterClient constructor
+ super.shutdown();
+ } catch (Exception e) {
+ log.error("An error occurred during the client shutdown.", e);
+ }
}
@Override