Skip to content

Commit

Permalink
new balancer adopted by zone rules
Browse files Browse the repository at this point in the history
  • Loading branch information
liwenhui-soul committed Dec 14, 2021
1 parent d06fd9f commit f6cc878
Show file tree
Hide file tree
Showing 26 changed files with 1,745 additions and 1,960 deletions.
3 changes: 2 additions & 1 deletion src/graph/executor/admin/SubmitJobExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ Value SubmitJobExecutor::convertJobTimestampToDateTime(int64_t timestamp) {

nebula::DataSet SubmitJobExecutor::buildShowResultData(
const nebula::meta::cpp2::JobDesc &jd, const std::vector<nebula::meta::cpp2::TaskDesc> &td) {
if (jd.get_cmd() == meta::cpp2::AdminCmd::DATA_BALANCE) {
if (jd.get_cmd() == meta::cpp2::AdminCmd::DATA_BALANCE ||
jd.get_cmd() == meta::cpp2::AdminCmd::ZONE_BALANCE) {
nebula::DataSet v(
{"Job Id(spaceId:partId)", "Command(src->dst)", "Status", "Start Time", "Stop Time"});
const auto &paras = jd.get_paras();
Expand Down
1 change: 1 addition & 0 deletions src/graph/validator/AdminJobValidator.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class AdminJobValidator final : public Validator {
case meta::cpp2::AdminCmd::FLUSH:
case meta::cpp2::AdminCmd::DATA_BALANCE:
case meta::cpp2::AdminCmd::LEADER_BALANCE:
case meta::cpp2::AdminCmd::ZONE_BALANCE:
return true;
// TODO: Also space related, but not available in CreateJobExecutor now.
case meta::cpp2::AdminCmd::DOWNLOAD:
Expand Down
1 change: 1 addition & 0 deletions src/interface/meta.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ enum AdminCmd {
DOWNLOAD = 7,
INGEST = 8,
LEADER_BALANCE = 9,
ZONE_BALANCE = 10,
UNKNOWN = 99,
} (cpp.enum_strict)

Expand Down
2 changes: 2 additions & 0 deletions src/meta/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ nebula_add_library(
processors/job/AdminJobProcessor.cpp
processors/job/ReportTaskProcessor.cpp
processors/job/JobUtils.cpp
processors/job/StorageJobExecutor.cpp
processors/job/JobExecutor.cpp
processors/job/MetaJobExecutor.cpp
processors/job/SimpleConcurrentJobExecutor.cpp
processors/job/CompactJobExecutor.cpp
Expand Down
Loading

0 comments on commit f6cc878

Please sign in to comment.