mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
ZEPPELIN-528 Add 'progress' to paragraph information when running
* It would be hard to trap RUNNING state, so I can't add UT
This commit is contained in:
parent
16e921b6ad
commit
2597ebfcdc
2 changed files with 6 additions and 3 deletions
|
|
@ -58,15 +58,15 @@ public abstract class Job {
|
|||
FINISHED,
|
||||
ERROR,
|
||||
ABORT;
|
||||
boolean isReady() {
|
||||
public boolean isReady() {
|
||||
return this == READY;
|
||||
}
|
||||
|
||||
boolean isRunning() {
|
||||
public boolean isRunning() {
|
||||
return this == RUNNING;
|
||||
}
|
||||
|
||||
boolean isPending() {
|
||||
public boolean isPending() {
|
||||
return this == PENDING;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -303,6 +303,9 @@ public class Note implements Serializable, JobListener {
|
|||
info.put("status", p.getStatus().toString());
|
||||
info.put("started", p.getDateStarted().toString());
|
||||
info.put("finished", p.getDateFinished().toString());
|
||||
if (p.getStatus().isRunning()) {
|
||||
info.put("progress", String.valueOf(p.progress()));
|
||||
}
|
||||
paragraphsInfo.add(info);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue