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

refactor AdminClient #3781

Merged
merged 6 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
40 changes: 24 additions & 16 deletions src/interface/storage.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ service GraphStorageService {
//////////////////////////////////////////////////////////
// Common response for admin methods
struct AdminExecResp {
1: required ResponseCommon result,
1: required ResponseCommon result,
2: optional meta.StatsItem stats,
}

Expand Down Expand Up @@ -759,27 +759,36 @@ struct CreateCPRequest {
2: binary name,
}

struct CreateCPResp {
1: common.ErrorCode code,
2: list<common.CheckpointInfo> info,
}

struct DropCPRequest {
1: list<common.GraphSpaceID> space_ids,
2: binary name,
}

struct DropCPResp {
1: common.ErrorCode code,
}

enum EngineSignType {
BLOCK_ON = 1,
BLOCK_OFF = 2,
}


struct BlockingSignRequest {
1: list<common.GraphSpaceID> space_ids,
2: required EngineSignType sign,
}

struct BlockResp {
critical27 marked this conversation as resolved.
Show resolved Hide resolved
1: common.ErrorCode code,
}

struct GetLeaderPartsResp {
1: required ResponseCommon result,
1: common.ErrorCode code,
2: map<common.GraphSpaceID, list<common.PartitionID>> (
cpp.template = "std::unordered_map") leader_parts;
}
Expand All @@ -798,11 +807,6 @@ struct RebuildIndexRequest {
3: common.IndexID index_id,
}

struct CreateCPResp {
1: required ResponseCommon result,
2: list<common.CheckpointInfo> info,
}

struct ListClusterInfoResp {
1: required ResponseCommon result,
2: common.DirInfo dir,
Expand All @@ -820,11 +824,19 @@ struct AddAdminTaskRequest {
5: optional i32 concurrency
}

struct AddTaskResp {
1: common.ErrorCode code,
}

struct StopAdminTaskRequest {
1: i32 job_id
2: i32 task_id
}

struct StopTaskResp {
1: common.ErrorCode code,
}

service StorageAdminService {
// Interfaces for admin operations
AdminExecResp transLeader(1: TransLeaderReq req);
Expand All @@ -836,20 +848,16 @@ service StorageAdminService {

// Interfaces for nebula cluster checkpoint
CreateCPResp createCheckpoint(1: CreateCPRequest req);
AdminExecResp dropCheckpoint(1: DropCPRequest req);
AdminExecResp blockingWrites(1: BlockingSignRequest req);

// Interfaces for rebuild index
AdminExecResp rebuildTagIndex(1: RebuildIndexRequest req);
AdminExecResp rebuildEdgeIndex(1: RebuildIndexRequest req);
DropCPResp dropCheckpoint(1: DropCPRequest req);
BlockResp blockingWrites(1: BlockingSignRequest req);

// Return all leader partitions on this host
GetLeaderPartsResp getLeaderParts(1: GetLeaderReq req);
// Return all peers
AdminExecResp checkPeers(1: CheckPeersReq req);

AdminExecResp addAdminTask(1: AddAdminTaskRequest req);
AdminExecResp stopAdminTask(1: StopAdminTaskRequest req);
AddTaskResp addAdminTask(1: AddAdminTaskRequest req);
critical27 marked this conversation as resolved.
Show resolved Hide resolved
StopTaskResp stopAdminTask(1: StopAdminTaskRequest req);
}


Expand Down
Loading