Skip to content

Commit

Permalink
Fix job log
Browse files Browse the repository at this point in the history
### What changes are proposed in this pull request?
log after job status change

### Why are the changes needed?

fix bug

### Does this PR introduce any user facing changes?
na

			pr-link: #17713
			change-id: cid-ba598f14ad49f626d7990521bef94cc1c4a47cdb
  • Loading branch information
jja725 authored and alluxio-bot committed Jun 29, 2023
1 parent 5aaf8c8 commit f4fe8bd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,14 @@ public void failJob(AlluxioRuntimeException reason) {
setJobState(JobState.FAILED, true);
mFailedReason = Optional.of(reason);
JOB_COPY_FAIL.inc();
LOG.info("Copy Job {} fails with status: {}", mJobId, this);
}

@Override
public void setJobSuccess() {
setJobState(JobState.SUCCEEDED, true);
JOB_COPY_SUCCESS.inc();
LOG.info("Copy Job {} succeeds with status {}", mJobId, this);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,14 @@ public void failJob(AlluxioRuntimeException reason) {
setJobState(JobState.FAILED, true);
mFailedReason = Optional.of(reason);
JOB_LOAD_FAIL.inc();
LOG.info("Load Job {} fails with status: {}", mJobId, this);
}

@Override
public void setJobSuccess() {
setJobState(JobState.SUCCEEDED, true);
JOB_LOAD_SUCCESS.inc();
LOG.info("Load Job {} succeeds with status {}", mJobId, this);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,17 +214,17 @@ public void setVerificationEnabled(boolean enableVerification) {
*/
@Override
public void failJob(AlluxioRuntimeException reason) {
LOG.info("Move Job {} fails with status: {}", mJobId, this);
setJobState(JobState.FAILED, true);
mFailedReason = Optional.of(reason);
JOB_MOVE_FAIL.inc();
LOG.info("Move Job {} fails with status: {}", mJobId, this);
}

@Override
public void setJobSuccess() {
LOG.info("Move Job {} succeeds with status {}", mJobId, this);
setJobState(JobState.SUCCEEDED, true);
JOB_MOVE_SUCCESS.inc();
LOG.info("Move Job {} succeeds with status {}", mJobId, this);
}

/**
Expand Down

0 comments on commit f4fe8bd

Please sign in to comment.