Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AMORO-3172] AMS ProcessStatus Miss Running Status #3173

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,12 @@

package org.apache.amoro.process;

/**
* Status of any {@link AmoroProcess}. Only UNKNOWN, RUNNING, FINISHED(SUCCESS, CLOSED, FAILED) are
* necessary Stage classes are used to define multiple phases of one process such as OptimizingStage
*/
/** Status of any {@link AmoroProcess}. */
public enum ProcessStatus {
UNKNOWN,
PENDING,

/** This status containing scheduled and running phases */
ACTIVE,
RUNNING,
czy006 marked this conversation as resolved.
Show resolved Hide resolved
SUBMITTED,
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.SUBMITTED;
@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.SUBMITTED && status == ProcessStatus.SUBMITTED) {
endTime = -1L;
failedReason = null;
summary = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,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
Loading