Skip to content

Commit

Permalink
fix job status when all finished (#4717)
Browse files Browse the repository at this point in the history
* fix job name from zone balance to data balance

* address wenhui's comment
  • Loading branch information
SuperYoko authored Oct 13, 2022
1 parent 3a2912d commit f7d42ae
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/graph/executor/admin/SubmitJobExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,14 @@ StatusOr<DataSet> SubmitJobExecutor::buildResult(meta::cpp2::JobOp jobOp,
}
const auto &jobsDesc = *resp.job_desc_ref();
for (const auto &jobDesc : jobsDesc) {
// show zone balance as data balance
auto type = jobDesc.get_type();
if (type == meta::cpp2::JobType::ZONE_BALANCE) {
type = meta::cpp2::JobType::DATA_BALANCE;
}
v.emplace_back(nebula::Row({
jobDesc.get_job_id(),
apache::thrift::util::enumNameSafe(jobDesc.get_type()),
apache::thrift::util::enumNameSafe(type),
apache::thrift::util::enumNameSafe(jobDesc.get_status()),
convertJobTimestampToDateTime(jobDesc.get_start_time()),
convertJobTimestampToDateTime(jobDesc.get_stop_time()),
Expand Down Expand Up @@ -124,7 +129,7 @@ nebula::DataSet SubmitJobExecutor::buildShowResultData(
uint32_t total = paras.size() - index - 1, succeeded = 0, failed = 0, inProgress = 0,
invalid = 0;
v.emplace_back(Row({jd.get_job_id(),
apache::thrift::util::enumNameSafe(meta::cpp2::JobType::ZONE_BALANCE),
apache::thrift::util::enumNameSafe(meta::cpp2::JobType::DATA_BALANCE),
apache::thrift::util::enumNameSafe(jd.get_status()),
convertJobTimestampToDateTime(jd.get_start_time()).toString(),
convertJobTimestampToDateTime(jd.get_stop_time()).toString(),
Expand Down

0 comments on commit f7d42ae

Please sign in to comment.