From commits-return-16438-archive-asf-public=cust-asf.ponee.io@flink.apache.org Tue Mar 20 10:14:53 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 810B618064A for ; Tue, 20 Mar 2018 10:14:52 +0100 (CET) Received: (qmail 60380 invoked by uid 500); 20 Mar 2018 09:14:51 -0000 Mailing-List: contact commits-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list commits@flink.apache.org Received: (qmail 60371 invoked by uid 99); 20 Mar 2018 09:14:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2018 09:14:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8DB6FF66FE; Tue, 20 Mar 2018 09:14:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: chesnay@apache.org To: commits@flink.apache.org Date: Tue, 20 Mar 2018 09:14:50 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/6] flink git commit: [FLINK-8935][tests] Implement MiniClusterClient#stop Repository: flink Updated Branches: refs/heads/master 463b922ab -> 2dab4374b [FLINK-8935][tests] Implement MiniClusterClient#stop This closes #5690. Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/2dab4374 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/2dab4374 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/2dab4374 Branch: refs/heads/master Commit: 2dab4374bc5280a2b4536f7ad1e153d6361a8885 Parents: ca514e1 Author: zentol Authored: Wed Mar 7 13:02:27 2018 +0100 Committer: zentol Committed: Tue Mar 20 10:14:26 2018 +0100 ---------------------------------------------------------------------- .../apache/flink/client/program/MiniClusterClient.java | 2 +- .../apache/flink/runtime/minicluster/MiniCluster.java | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/2dab4374/flink-clients/src/main/java/org/apache/flink/client/program/MiniClusterClient.java ---------------------------------------------------------------------- diff --git a/flink-clients/src/main/java/org/apache/flink/client/program/MiniClusterClient.java b/flink-clients/src/main/java/org/apache/flink/client/program/MiniClusterClient.java index 4354267..276df62 100644 --- a/flink-clients/src/main/java/org/apache/flink/client/program/MiniClusterClient.java +++ b/flink-clients/src/main/java/org/apache/flink/client/program/MiniClusterClient.java @@ -113,7 +113,7 @@ public class MiniClusterClient extends ClusterClient miniCluster.stopJob(jobId), scheduledExecutor).get(); } @Override http://git-wip-us.apache.org/repos/asf/flink/blob/2dab4374/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java ---------------------------------------------------------------------- diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java b/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java index e958005..bc75a54 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java @@ -512,6 +512,17 @@ public class MiniCluster implements JobExecutorService, AutoCloseableAsync { } } + public CompletableFuture stopJob(JobID jobId) { + try { + return getDispatcherGateway().stopJob(jobId, rpcTimeout); + } catch (LeaderRetrievalException | InterruptedException e) { + return FutureUtils.completedExceptionally( + new FlinkException( + String.format("Could not stop job %s.", jobId), + e)); + } + } + public CompletableFuture triggerSavepoint(JobID jobId, String targetDirectory, boolean cancelJob) { try { return getDispatcherGateway().triggerSavepoint(jobId, targetDirectory, cancelJob, rpcTimeout);