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

Implement admin client for balancer #553

Merged
merged 5 commits into from
Jul 15, 2019
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
1 change: 1 addition & 0 deletions src/daemons/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ add_executable(
$<TARGET_OBJECTS:meta_client>
$<TARGET_OBJECTS:meta_thrift_obj>
$<TARGET_OBJECTS:common_thrift_obj>
$<TARGET_OBJECTS:storage_thrift_obj>
$<TARGET_OBJECTS:raftex_obj>
$<TARGET_OBJECTS:raftex_thrift_obj>
$<TARGET_OBJECTS:wal_obj>
Expand Down
27 changes: 26 additions & 1 deletion src/interface/storage.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,15 @@ struct AddEdgesRequest {
}

struct AdminExecResp {

1: ErrorCode code,
// Only valid when code is E_LEADER_CHANAGED.
2: common.HostAddr leader,
}

struct AddPartReq {
1: common.GraphSpaceID space_id,
2: common.PartitionID part_id,
3: bool as_learner,
}

struct RemovePartReq {
Expand All @@ -179,6 +182,25 @@ struct MemberChangeReq {
2: common.PartitionID part_id,
}

struct TransLeaderReq {
1: common.GraphSpaceID space_id,
2: common.PartitionID part_id,
3: common.HostAddr new_leader,
}

struct AddLearnerReq {
1: common.GraphSpaceID space_id,
2: common.PartitionID part_id,
3: common.HostAddr learner,
}

struct CatchUpDataReq {
1: common.GraphSpaceID space_id,
2: common.GraphSpaceID part_id,
3: common.HostAddr target,
}


service StorageService {
QueryResponse getOutBound(1: GetNeighborsRequest req)
QueryResponse getInBound(1: GetNeighborsRequest req)
Expand All @@ -194,7 +216,10 @@ service StorageService {
ExecResponse addEdges(1: AddEdgesRequest req);

// Interfaces for admin operations
AdminExecResp transLeader(1: TransLeaderReq req);
AdminExecResp addPart(1: AddPartReq req);
AdminExecResp addLearner(1: AddLearnerReq req);
AdminExecResp waitingForCatchUpData(1: CatchUpDataReq req);
AdminExecResp removePart(1: RemovePartReq req);
AdminExecResp memberChange(1: MemberChangeReq req);
}
Expand Down
1 change: 1 addition & 0 deletions src/meta/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ add_dependencies(
meta_service_handler
base_obj
meta_thrift_obj
storage_thrift_obj
common_thrift_obj
kvstore_obj
thread_obj
Expand Down
Loading