Skip to content

Commit

Permalink
[FLINK-3019] [client] List restarting jobs with scheduled jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
uce committed Nov 19, 2015
1 parent 5a86a0a commit 9abbeac
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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("--------------------------------------------------------------");
}
Expand Down

0 comments on commit 9abbeac

Please sign in to comment.