Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
730
Browse files Browse the repository at this point in the history
  • Loading branch information
sunqinzheng committed Mar 25, 2019
1 parent 59a6cf2 commit dc5e23b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/rest-server/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ Status: 200
retryDetails: {
// Job failed due to user or unknown error
user: userRetries,
// Job failed due to system/plaform error
system: systemRetries,
// Job failed due to platform error
platform: platformRetries,
// Job cannot get required resource to run within timeout
resource: resourceRetries,
},
Expand Down
12 changes: 6 additions & 6 deletions src/rest-server/src/models/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class Job {
// and cannot get required resource to run.
// 3. unKnownRetriedCount
// Usually caused by user's code.
const systemRetries = frameworkInfo.frameworkRetryPolicyState.transientNormalRetriedCount;
const platformRetries = frameworkInfo.frameworkRetryPolicyState.transientNormalRetriedCount;
const resourceRetries = frameworkInfo.frameworkRetryPolicyState.transientConflictRetriedCount;
const userRetries = frameworkInfo.frameworkRetryPolicyState.unKnownRetriedCount;
const job = {
Expand All @@ -128,10 +128,10 @@ class Job {
state: this.convertJobState(frameworkInfo.frameworkState, frameworkInfo.applicationExitCode),
subState: frameworkInfo.frameworkState,
executionType: frameworkInfo.executionType,
retries: systemRetries + resourceRetries + userRetries,
retries: platformRetries + resourceRetries + userRetries,
retryDetails: {
user: userRetries,
system: systemRetries,
platform: platformRetries,
resource: resourceRetries,
},
createdTime: frameworkInfo.firstRequestTimestamp || new Date(2018, 1, 1).getTime(),
Expand Down Expand Up @@ -368,7 +368,7 @@ class Job {
frameworkStatus.applicationExitCode,
);

const systemRetries = frameworkStatus.frameworkRetryPolicyState.transientNormalRetriedCount;
const platformRetries = frameworkStatus.frameworkRetryPolicyState.transientNormalRetriedCount;
const resourceRetries = frameworkStatus.frameworkRetryPolicyState.transientConflictRetriedCount;
const userRetries = frameworkStatus.frameworkRetryPolicyState.unKnownRetriedCount;
jobDetail.jobStatus = {
Expand All @@ -377,10 +377,10 @@ class Job {
state: jobState,
subState: frameworkStatus.frameworkState,
executionType: framework.summarizedFrameworkInfo.executionType,
retries: systemRetries + resourceRetries + userRetries,
retries: platformRetries + resourceRetries + userRetries,
retryDetails: {
user: userRetries,
system: systemRetries,
platform: platformRetries,
resource: resourceRetries,
},
createdTime: frameworkStatus.frameworkCreatedTimestamp,
Expand Down

0 comments on commit dc5e23b

Please sign in to comment.