From 9abbeace9fba233a63e214b1bc21a66d44e67434 Mon Sep 17 00:00:00 2001 From: Ufuk Celebi Date: Tue, 17 Nov 2015 14:11:44 +0100 Subject: [PATCH] [FLINK-3019] [client] List restarting jobs with scheduled jobs --- .../src/main/java/org/apache/flink/client/CliFrontend.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java b/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java index 070040c44db02..6a79677fc8a6d 100644 --- a/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java +++ b/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java @@ -509,7 +509,8 @@ protected int list(String[] args) { } for (JobStatusMessage rj : jobs) { - if (running && rj.getJobState().equals(JobStatus.RUNNING)) { + if (running && (rj.getJobState().equals(JobStatus.RUNNING) + || rj.getJobState().equals(JobStatus.RESTARTING))) { runningJobs.add(rj); } if (scheduled && rj.getJobState().equals(JobStatus.CREATED)) { @@ -532,10 +533,10 @@ public int compare(JobStatusMessage o1, JobStatusMessage o2) { else { Collections.sort(runningJobs, njec); - System.out.println("------------------------ Running Jobs ------------------------"); + System.out.println("------------------ Running/Restarting Jobs -------------------"); for (JobStatusMessage rj : runningJobs) { System.out.println(df.format(new Date(rj.getStartTime())) - + " : " + rj.getJobId() + " : " + rj.getJobName()); + + " : " + rj.getJobId() + " : " + rj.getJobName() + " (" + rj.getJobState() + ")"); } System.out.println("--------------------------------------------------------------"); }