Skip to content

Commit

Permalink
[AMORO-3172] AMS ProcessStatus Miss Running Status
Browse files Browse the repository at this point in the history
  • Loading branch information
ConradJam authored and czy006 committed Sep 19, 2024
1 parent 5027abe commit 7eee079
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
*/
public enum ProcessStatus {
UNKNOWN,

/** This status containing scheduled and running phases */
ACTIVE,
RUNNING,
QUEUEING,
SUCCESS,
CLOSED,
FAILED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public abstract class TableProcess<T extends TableProcessState> implements Amoro
protected final TableRuntime tableRuntime;
private final SimpleFuture submitFuture = new SimpleFuture();
private final SimpleFuture completeFuture = new SimpleFuture();
private volatile ProcessStatus status = ProcessStatus.ACTIVE;
private volatile ProcessStatus status = ProcessStatus.RUNNING;
private volatile String failedReason;

protected TableProcess(T state, TableRuntime tableRuntime) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class TableProcessState implements ProcessState {
private final ServerTableIdentifier tableIdentifier;
@StateField private long startTime;
@StateField private long endTime = -1L;
@StateField private ProcessStatus status = ProcessStatus.ACTIVE;
@StateField private ProcessStatus status = ProcessStatus.QUEUEING;
@StateField private volatile String failedReason;
private volatile Map<String, String> summary;

Expand Down Expand Up @@ -108,7 +108,7 @@ protected void setStatus(ProcessStatus status) {
|| status == ProcessStatus.FAILED
|| status == ProcessStatus.CLOSED) {
endTime = System.currentTimeMillis();
} else if (this.status != ProcessStatus.ACTIVE && status == ProcessStatus.ACTIVE) {
} else if (this.status != ProcessStatus.QUEUEING && status == ProcessStatus.RUNNING) {
endTime = -1L;
failedReason = null;
summary = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ protected OptimizingProcessInfo getOptimizingInfo(
HoodieInstant inf =
instantMap.get(instantTimestamp + "_" + HoodieInstant.State.INFLIGHT.name());
if (inf != null) {
processInfo.setStatus(ProcessStatus.ACTIVE);
processInfo.setStatus(ProcessStatus.RUNNING);
}
}
return processInfo;
Expand Down

0 comments on commit 7eee079

Please sign in to comment.