/* * Copyright 2021 4Paradigm * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ syntax = "proto2"; import "type.proto"; import "common.proto"; import "sql_procedure.proto"; package openmldb.api; option java_package = "com._4paradigm.openmldb.proto"; option cc_generic_services = true; option java_outer_classname = "Tablet"; enum TableMode { kTableLeader = 1; kTableFollower = 2; } enum TableState { kTableUndefined = 0; kTableNormal = 1; kTableLoading = 2; kMakingSnapshot = 3; kSnapshotPaused = 4; } enum GetType { kSubKeyEq = 1; kSubKeyLt = 2; kSubKeyLe = 3; kSubKeyGt = 4; kSubKeyGe = 5; } enum OPType { kMakeSnapshotOP = 1; kAddReplicaOP = 2; kDelReplicaOP = 3; kChangeLeaderOP = 4; kOfflineReplicaOP = 5; kReAddReplicaOP = 6; kReAddReplicaNoSendOP = 7; // need not send snapshot kReAddReplicaWithDropOP = 8; // should droptable before loadtable kReAddReplicaSimplifyOP = 9; // table is exist, need run addreplica task only kUpdateTableAliveOP = 10; // deleted kMigrateOP = 11; kReLoadTableOP = 12; kUpdatePartitionStatusOP = 13; kRecoverTableOP = 14; kCreateTableRemoteOP = 15; kDropTableRemoteOP = 16; kAddReplicaSimplyRemoteOP = 17; kDelReplicaRemoteOP = 18; kAddReplicaRemoteOP = 19; kAddIndexOP = 20; kDeployOP = 21; } enum TaskType { kMakeSnapshot = 1; kPauseSnapshot = 2; kRecoverSnapshot = 3; kSendSnapshot = 4; kLoadTable = 5; kAddReplica = 6; kAddTableInfo = 7; kDelReplica = 8; kDelTableInfo = 9; kChangeLeader = 10; kUpdatePartitionStatus = 11; kDropTable = 12; kUpdateTableAlive = 13; kUpdateTableInfo = 14; kSelectLeader = 15; kUpdateLeaderInfo = 16; kRecoverTable = 17; kCheckBinlogSyncProgress = 18; kCreateTableRemote = 19; kDropTableRemote = 20; kAddReplicaNSRemote = 21; kDumpIndexData = 22 [deprecated = true]; kSendIndexData = 23; kLoadIndexData = 24; kExtractIndexData = 25; kAddIndexToTablet = 26; kTableSyncTask = 27 [deprecated = true]; kSendIndexRequest = 28; kExtractIndexRequest = 29; kLoadIndexRequest = 30; kAddIndexToTabletRequest = 31; kAddIndexToTableInfo = 32; kAddMultiTableIndex = 33; kAddTableIndex = 34; kCreateProcedure = 35; } enum TaskStatus { kInited = 1; kDoing = 2; kDone = 3; kFailed = 4; kCanceled = 5; } enum MethodType { kPut = 1; kDelete = 2; } message TaskInfo { required uint64 op_id = 1; required OPType op_type = 2; required TaskType task_type = 3; required TaskStatus status = 4; optional string endpoint = 5; optional bool is_rpc_send = 6 [default = false]; repeated uint64 rep_cluster_op_id = 7; // for multi cluster optional uint64 task_id = 8 [default = 0]; optional uint32 tid = 9; optional uint32 pid = 10; } message OPInfo { required uint64 op_id = 1; required OPType op_type = 2; required uint32 task_index = 3; required string data = 4; optional TaskStatus task_status = 5; optional uint64 start_time = 6 [default = 0]; optional uint64 end_time = 7 [default = 0]; optional string name = 8; optional uint32 pid = 9; optional uint64 parent_id = 10; optional uint32 vec_idx = 11; // the index in task_vec optional uint64 remote_op_id = 12; // for multi cluster optional int32 for_replica_cluster = 13 [default = 0]; // for multi cluster, default 0. if 1, for multi cluster optional string db = 14; } message PartSnapshotOffset { optional uint32 pid = 2; optional uint64 offset = 3; } message TableSnapshotOffsetResponse { message Table { optional uint32 tid = 1; repeated PartSnapshotOffset parts = 2; } optional int32 code = 1; optional string msg = 2; repeated Table tables = 3; } message Manifest { optional uint64 offset = 1; optional string name = 2; optional uint64 count = 3; optional uint64 term = 4; } message Dimension { optional string key = 1; optional uint32 idx = 2; } message TSDimension { optional uint64 ts = 1; optional uint32 idx = 2; } message PutRequest { // the prefix key // abandoned optional string pk = 1; // the subfix key optional int64 time = 2; optional bytes value = 3; optional uint32 tid = 4; optional uint32 pid = 5; repeated Dimension dimensions = 6; repeated TSDimension ts_dimensions = 7 [deprecated = true]; optional uint32 format_version = 8 [default = 0, deprecated = true]; optional uint32 memory_limit = 9; optional bool put_if_absent = 10 [default = false]; optional bool check_exists = 11 [default = false]; } message PutResponse { optional int32 code = 1; optional string msg = 2; } message DeleteRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional string key = 3; optional string idx_name = 4; repeated Dimension dimensions = 5; optional uint64 ts = 6; optional uint64 end_ts = 7; optional string ts_name = 8; optional bool enable_decode_value = 9 [default = true]; } message ExecuteGcRequest { optional uint32 tid = 1; optional uint32 pid = 2; } message GeneralRequest { required int32 tid = 1; required int32 pid = 2; optional TaskInfo task_info = 3; optional uint64 offset = 4; optional openmldb.common.StorageMode storage_mode = 5 [default = kMemory]; } message TaskStatusRequest {} message TaskStatusResponse { optional int32 code = 1; optional string msg = 2; repeated TaskInfo task = 3; } message DeleteTaskRequest { repeated uint64 op_id = 1; } message GeneralResponse { optional int32 code = 1; optional string msg = 2; repeated int64 additional_ids = 3; optional uint32 count = 4; } message ScanRequest { // the prefix key optional string pk = 1; // the start subfix key (inclusive) optional uint64 st = 2; // the end subfix key (exclusive) optional uint64 et = 3; optional uint32 limit = 4; optional uint32 tid = 5; optional uint32 pid = 6; optional bool enable_remove_duplicated_record = 7 [default = false]; optional string idx_name = 8; optional bool enable_remove_ts = 9 [default = false]; repeated uint32 projection = 10; repeated uint32 pid_group = 11; optional bool use_attachment = 12 [default = false]; optional uint32 skip_record_num = 13 [default = 0]; } message TraverseRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional string idx_name = 3; optional uint32 limit = 4 [default = 100]; optional string pk = 5; optional uint64 ts = 6; optional bool enable_remove_duplicated_record = 7 [default = false]; optional bool skip_current_pk = 8 [default = false]; optional uint32 ts_pos = 9; } message TraverseResponse { optional bytes pairs = 1; optional string msg = 2; optional int32 code = 3; optional uint32 count = 4; optional string pk = 5; optional uint64 ts = 6; optional bool is_finish = 7; optional uint64 snapshot_id = 8; optional uint32 ts_pos = 9; } message ScanResponse { optional bytes pairs = 1; optional string msg = 2; optional int32 code = 3; optional uint32 count = 4; optional uint32 buf_size = 5; optional bool is_finish = 6 [default = true]; } message ReplicaRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional string endpoint = 3; optional TaskInfo task_info = 4; optional uint32 remote_tid = 5; // for remote } message AddReplicaResponse { optional int32 code = 1; optional string msg = 2; } message TableMeta { optional int32 tid = 1; optional string name = 2; optional int32 pid = 3; optional int32 seg_cnt = 4; // the slave endpoints repeated string replicas = 5; optional TableMode mode = 6; optional uint64 term = 7 [default = 0]; optional openmldb.type.CompressType compress_type = 8; optional uint32 key_entry_max_height = 9; repeated openmldb.common.ColumnDesc column_desc = 10; repeated openmldb.common.ColumnKey column_key = 11; repeated openmldb.common.ColumnDesc added_column_desc = 12; // format_version 0 , the legacy format 1 ,the new one optional uint32 format_version = 13 [default = 0, deprecated = true]; optional string db = 14 [default = ""]; repeated common.VersionPair schema_versions = 15; repeated common.TablePartition table_partition = 16; optional openmldb.common.StorageMode storage_mode = 17 [default = kMemory]; optional uint32 base_table_tid = 18 [default = 0]; } message CreateTableRequest { optional TableMeta table_meta = 1; } message UpdateTableMetaForAddFieldRequest { optional uint32 tid = 1; optional openmldb.common.ColumnDesc column_desc = 2; repeated openmldb.common.ColumnDesc column_descs = 3; optional openmldb.common.VersionPair version_pair = 4; } message CreateTableResponse { optional int32 code = 1; optional string msg = 2; } message LoadTableRequest { optional TableMeta table_meta = 1; optional TaskInfo task_info = 2; } message DropTableRequest { optional int32 tid = 1; optional int32 pid = 2; optional TaskInfo task_info = 3; } message DropTableResponse { optional int32 code = 1; optional string msg = 2; } message TruncateTableRequest { optional int32 tid = 1; optional int32 pid = 2; } message TruncateTableResponse { optional int32 code = 1; optional string msg = 2; } message GetTableSchemaRequest { optional int32 tid = 1; optional int32 pid = 2; } message SetExpireRequest { optional int32 tid = 1; optional int32 pid = 2; optional bool is_expire = 3; } message GetTableSchemaResponse { optional int32 code = 1; optional string msg = 2; optional TableMeta table_meta = 3; } message UpdateTTLRequest { optional int32 tid = 1; optional int32 pid = 2; optional openmldb.common.TTLSt ttl = 3; optional string index_name = 5; } message UpdateTTLResponse { optional int32 code = 1; optional string msg = 2; } message LogEntry { // term for leader optional uint64 term = 1; optional uint64 log_index = 2; optional string pk = 3; optional bytes value = 4; optional uint64 ts = 5; repeated Dimension dimensions = 6; optional MethodType method_type = 7; repeated TSDimension ts_dimensions = 8 [deprecated = true]; optional uint64 end_ts = 9; // only for range delete: [ts, end_ts) optional string ts_name = 10; } message AppendEntriesRequest { optional uint64 pre_log_index = 2; repeated LogEntry entries = 4; optional uint32 tid = 6; optional uint32 pid = 7; optional uint64 term = 8; } message AppendEntriesResponse { optional uint64 log_offset = 1; optional int32 code = 2; optional string msg = 3; optional uint64 term = 4; } message ChangeRoleRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional uint64 term = 3; optional TableMode mode = 4; repeated string replicas = 5; repeated openmldb.common.EndpointAndTid endpoint_tid = 6; } message SendSnapshotRequest { required uint32 tid = 1; required uint32 pid = 2; required string endpoint = 3; optional TaskInfo task_info = 4; optional uint32 remote_tid = 5; } message SendIndexDataRequest { message EndpointPair { optional uint32 pid = 1; optional string endpoint = 2; } optional uint32 tid = 1; optional uint32 pid = 2; repeated EndpointPair pairs = 3; optional TaskInfo task_info = 4; } message SendDataRequest { required uint32 tid = 1; required uint32 pid = 2; required string file_name = 3; required uint64 block_id = 4; optional uint32 block_size = 5; optional bool eof = 6 [default = false]; optional string dir_name = 7; optional openmldb.common.StorageMode storage_mode = 8 [default = kMemory]; } message ChangeRoleResponse { optional int32 code = 1; optional string msg = 2; } // Get all table status information on tablet message GetTableStatusRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional bool need_schema = 3 [default = false]; } message TsIdxStatus { optional string idx_name = 1; repeated uint64 seg_cnts = 2; } // table status message message TableStatus { optional uint32 tid = 1; optional uint32 pid = 2; optional uint64 offset = 3; optional TableMode mode = 4; optional TableState state = 5; optional bool is_expire = 7; optional int64 time_offset = 8; optional uint64 record_cnt = 9; optional uint64 idx_cnt = 10; repeated TsIdxStatus ts_idx_status = 11; optional string name = 12; optional uint64 record_byte_size = 13; optional uint64 record_idx_byte_size = 14; optional uint64 record_pk_cnt = 15; optional openmldb.type.CompressType compress_type = 17; optional uint32 skiplist_height = 18; optional uint64 diskused = 19 [default = 0]; optional openmldb.common.StorageMode storage_mode = 20 [default = kMemory]; optional string snapshot_path = 21; optional string binlog_path = 22; } message GetTableStatusResponse { repeated TableStatus all_table_status = 1; optional int32 code = 2; optional string msg = 3; } message GetRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional string key = 3; optional uint64 ts = 4 [default = 0]; optional string idx_name = 5; optional GetType type = 6 [default = kSubKeyEq]; optional uint64 et = 7; optional GetType et_type = 8 [default = kSubKeyGe]; repeated uint32 projection = 9; repeated uint32 pid_group = 10; } message GetResponse { optional int32 code = 1; optional string msg = 2; optional string key = 3; optional uint64 ts = 4; optional bytes value = 5; } message CountRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional string idx_name = 3; optional string key = 4; optional bool filter_expired_data = 5 [default = false]; optional bool enable_remove_duplicated_record = 6 [default = false]; optional uint64 st = 7 [default = 0]; optional GetType st_type = 8 [default = kSubKeyLe]; optional uint64 et = 9 [default = 0]; optional GetType et_type = 10 [default = kSubKeyGt]; } message CountResponse { optional int32 code = 1; optional string msg = 2; optional uint32 count = 3; } message GetTermPairRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional openmldb.common.StorageMode storage_mode = 3 [default = kMemory]; } message GetTermPairResponse { optional int32 code = 1; optional string msg = 2; optional uint64 term = 3; optional uint64 offset = 4; optional bool has_table = 5; optional bool is_leader = 6; } message GetManifestRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional openmldb.common.StorageMode storage_mode = 3 [default = kMemory]; } message GetManifestResponse { optional int32 code = 1; optional string msg = 2; optional Manifest manifest = 3; } message GetTableFollowerRequest { optional uint32 tid = 1; optional uint32 pid = 2; } message FollowerInfo { optional string endpoint = 1; optional uint64 offset = 2; } message GetTableFollowerResponse { optional int32 code = 1; optional string msg = 2; optional uint64 offset = 3; repeated FollowerInfo follower_info = 4; } message CheckFileRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional string file = 3; optional uint64 size = 4; optional string dir_name = 5; optional openmldb.common.StorageMode storage_mode = 6 [default = kMemory]; } message AddIndexRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional openmldb.common.ColumnKey column_key = 3; repeated openmldb.common.ColumnKey column_keys = 4; } message SetModeRequest { optional bool follower = 1; } message EmptyRequest {} message ConnectZKRequest {} message DisConnectZKRequest {} message HttpRequest {} message HttpResponse {} message DeleteIndexRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional string idx_name = 3; } message LoadIndexDataRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional uint32 partition_num = 3; optional TaskInfo task_info = 4; } message ExtractIndexDataRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional uint32 partition_num = 3; repeated openmldb.common.ColumnKey column_key = 5; optional uint64 offset = 6; optional bool dump_data = 7 [default = true]; optional TaskInfo task_info = 8; } message Columns { repeated string name = 1; optional bytes value = 2 [default = ""]; optional GetType type = 3 [default = kSubKeyEq]; } message CancelOPRequest { optional uint64 op_id = 1; } message RealEndpointPair { optional string name = 1; optional string real_endpoint = 2; } message UpdateRealEndpointMapRequest { repeated RealEndpointPair real_endpoint_map = 1; } message QueryRequest { optional string sql = 1; optional string db = 2; optional bool is_batch = 3; optional bool is_debug = 4 [default = false]; optional string sp_name = 5; optional bool is_procedure = 6 [default = false]; optional uint64 task_id = 7; optional uint32 row_size = 8; optional uint32 row_slices = 9; optional uint32 parameter_row_size = 10; optional uint32 parameter_row_slices = 11; repeated openmldb.type.DataType parameter_types = 12; } message QueryResponse { optional int32 code = 1; optional string msg = 2; optional uint32 count = 3; optional uint32 byte_size = 4; optional bytes schema = 5; optional uint32 row_slices = 6; } /** * Batch request rows encoding: * (1) Multiple rows are stored in attachment consecutively and use `row_sizes` * to find each row's start offset in attachment buffer. Multiple slices in * row are stored consecutively also, with slice size encoded just in slice data. * * (2) If non-trivial common columns exist * - `row_sizes` store N+1 integers, the first is the total size of common row part, the next N is total size of each non-common row part from batch. * - `common_slices` represent common row's slices num. * - `non_common_slices` represent non-common row's slices num. * - the actual ith row is concat of common row part and ith non-common row part. * * (3) else * - `row_sizes` store N integers, each record total size (sum of slice sizes) of one row from batch. * - `common_slices` = 0 * - `non_common_slices` represent slices num of each row. */ message SQLBatchRequestQueryRequest { optional string sql = 1; optional string db = 2; repeated uint32 common_column_indices = 3; optional bool is_debug = 4 [default = false]; optional string sp_name = 5; optional bool is_procedure = 6 [default = false]; repeated uint32 row_sizes = 7; optional uint32 common_slices = 8; optional uint32 non_common_slices = 9; optional uint64 task_id = 10; } message SQLBatchRequestQueryResponse { optional int32 code = 1; optional string msg = 2; optional uint32 count = 3; optional bytes schema = 4; repeated uint32 common_column_indices = 5; repeated uint32 row_sizes = 6; optional uint32 common_slices = 7; optional uint32 non_common_slices = 8; } message ExplainRequest { optional string sql = 1; optional string db = 2; optional bool is_batch = 3; } message ExplainResponse { optional bytes input_schema = 1; optional string logical_plan = 3; optional string physical_plan = 4; optional string ir = 5; optional bytes output_schema = 6; optional bool is_batch = 7; } message RefreshRequest { optional uint32 tid = 1; } message GetCatalogRequest {} message GetCatalogResponse { optional openmldb.common.CatalogInfo catalog = 1; optional int32 code = 2; optional string msg = 3; } message DataBlockInfo { optional uint32 ref_cnt = 1; optional uint64 offset = 2; // offset in DataRegion optional uint32 length = 3; } message BinlogInfo { repeated Dimension dimensions = 1; repeated TSDimension ts_dimensions = 2; optional int64 time = 3; optional uint32 block_id = 4; } message Segment { optional uint32 id = 1; message KeyEntries { optional bytes key = 1; message KeyEntry { optional uint32 key_entry_id = 1; message TimeEntry { optional uint64 time = 1; optional uint32 block_id = 2; } repeated TimeEntry time_entry = 2; } repeated KeyEntry key_entry = 2; // ts_cnt_ == key_entry_size() } repeated KeyEntries key_entries = 2; } message BulkLoadIndex { optional uint32 inner_index_id = 1; repeated Segment segment = 2; } // we use attachment(baidu_std supports) to send Data Region message BulkLoadRequest { optional uint32 tid = 1; optional uint32 pid = 2; optional int32 part_id = 3; // Data Region: DataBlockInfo & BinlogInfo repeated DataBlockInfo block_info = 4; // idx is the block id, entries in Index are using the block id repeated BinlogInfo binlog_info = 5; repeated BulkLoadIndex index_region = 6; optional bool eof = 7 [default = false]; } message BulkLoadInfoRequest { optional uint32 tid = 1; optional uint32 pid = 2; } message BulkLoadInfoResponse { optional int32 code = 1; optional string msg = 2; optional uint32 seg_cnt = 3; repeated int32 inner_index_pos = 4; message InnerIndexSt { message IndexDef { optional int32 ts_idx = 1 [default = -1]; // -1 means no ts_col optional bool is_ready = 2; } repeated IndexDef index_def = 1; } repeated InnerIndexSt inner_index = 5; // 4&5: Table::table_index_ message InnerSegments { message Segment { optional uint32 ts_cnt = 1; message MapFieldEntry { required uint32 key = 1; // TODO(hw): java will use int, cpp uses uint32. Not good? required uint32 value = 2; } repeated MapFieldEntry ts_idx_map = 2; // TODO(hw): proto3 can build map in proto2 syntax } repeated Segment segment = 1; } repeated InnerSegments inner_segments = 6; // MemTable::segments_ } message CreateFunctionRequest { optional openmldb.common.ExternalFun fun = 1; } message CreateFunctionResponse { optional int32 code = 1; optional string msg = 2; } message DropFunctionRequest { optional openmldb.common.ExternalFun fun = 1; } message DropFunctionResponse { optional int32 code = 1; optional string msg = 2; } message CreateAggregatorRequest { optional TableMeta base_table_meta = 1; optional uint32 aggr_table_tid = 2; optional uint32 aggr_table_pid = 3; optional uint32 index_pos = 4; optional string aggr_func = 5; optional string aggr_col = 6; optional string order_by_col = 7; optional string bucket_size = 8; optional string filter_col = 9; } message CreateAggregatorResponse { optional int32 code = 1; optional string msg = 2; } message GAFDeployStatsRequest {} message DeployStatsResponse { optional int32 code = 1; optional string msg = 2; message DeployStat { required string deploy_name = 1; // NOTE: time and total is the microsecond string required string time = 2; required uint32 count = 3; required string total = 4; } repeated DeployStat rows = 3; } service TabletServer { // kv storage api for client rpc Put(PutRequest) returns (PutResponse); rpc Get(GetRequest) returns (GetResponse); rpc Scan(ScanRequest) returns (ScanResponse); rpc Delete(DeleteRequest) returns (GeneralResponse); rpc Count(CountRequest) returns (CountResponse); rpc Traverse(TraverseRequest) returns (TraverseResponse); // sql api for client rpc Query(QueryRequest) returns (QueryResponse); rpc SubQuery(QueryRequest) returns (QueryResponse); rpc SQLBatchRequestQuery(SQLBatchRequestQueryRequest) returns (SQLBatchRequestQueryResponse); rpc SubBatchRequestQuery(SQLBatchRequestQueryRequest) returns (SQLBatchRequestQueryResponse); // table api for nameserver rpc CreateTable(CreateTableRequest) returns (CreateTableResponse); rpc LoadTable(LoadTableRequest) returns (GeneralResponse); rpc DropTable(DropTableRequest) returns (DropTableResponse); rpc TruncateTable(TruncateTableRequest) returns (TruncateTableResponse); rpc GetTableStatus(GetTableStatusRequest) returns (GetTableStatusResponse); rpc GetTableSchema(GetTableSchemaRequest) returns (GetTableSchemaResponse); rpc GetTableFollower(GetTableFollowerRequest) returns (GetTableFollowerResponse); rpc UpdateTTL(UpdateTTLRequest) returns (UpdateTTLResponse); rpc ExecuteGc(ExecuteGcRequest) returns (GeneralResponse); // replication api for master rpc AppendEntries(AppendEntriesRequest) returns (AppendEntriesResponse); rpc AddReplica(ReplicaRequest) returns (AddReplicaResponse); rpc DelReplica(ReplicaRequest) returns (GeneralResponse); rpc ChangeRole(ChangeRoleRequest) returns (ChangeRoleResponse); rpc MakeSnapshot(GeneralRequest) returns (GeneralResponse); rpc PauseSnapshot(GeneralRequest) returns (GeneralResponse); rpc RecoverSnapshot(GeneralRequest) returns (GeneralResponse); rpc SendSnapshot(SendSnapshotRequest) returns (GeneralResponse); rpc SendData(SendDataRequest) returns (GeneralResponse); rpc SetExpire(SetExpireRequest) returns (GeneralResponse); // name server interface rpc GetTaskStatus(TaskStatusRequest) returns (TaskStatusResponse); rpc DeleteOPTask(DeleteTaskRequest) returns (GeneralResponse); rpc GetTermPair(GetTermPairRequest) returns (GetTermPairResponse); rpc GetManifest(GetManifestRequest) returns (GetManifestResponse); rpc CheckFile(CheckFileRequest) returns (GeneralResponse); rpc DeleteBinlog(GeneralRequest) returns (GeneralResponse); rpc ShowMemPool(HttpRequest) returns (HttpResponse); rpc GetCatalog(GetCatalogRequest) returns (GetCatalogResponse); rpc ConnectZK(ConnectZKRequest) returns (GeneralResponse); rpc DisConnectZK(DisConnectZKRequest) returns (GeneralResponse); rpc UpdateTableMetaForAddField(UpdateTableMetaForAddFieldRequest) returns (GeneralResponse); rpc SetMode(SetModeRequest) returns (GeneralResponse); rpc GetAllSnapshotOffset(EmptyRequest) returns (TableSnapshotOffsetResponse); rpc AddIndex(AddIndexRequest) returns (GeneralResponse); rpc SendIndexData(SendIndexDataRequest) returns (GeneralResponse); rpc DeleteIndex(DeleteIndexRequest) returns (GeneralResponse); rpc LoadIndexData(LoadIndexDataRequest) returns (GeneralResponse); rpc ExtractIndexData(ExtractIndexDataRequest) returns (GeneralResponse); rpc CancelOP(CancelOPRequest) returns (GeneralResponse); rpc UpdateRealEndpointMap(UpdateRealEndpointMapRequest) returns (GeneralResponse); // sql procedure interfaces rpc CreateProcedure(openmldb.api.CreateProcedureRequest) returns (GeneralResponse); rpc DropProcedure(openmldb.api.DropProcedureRequest) returns (GeneralResponse); rpc Refresh(RefreshRequest) returns (GeneralResponse); // TODO(hw): nameserver call this? rpc GetBulkLoadInfo(BulkLoadInfoRequest) returns (BulkLoadInfoResponse); rpc BulkLoad(BulkLoadRequest) returns (GeneralResponse); rpc CreateFunction(CreateFunctionRequest) returns (CreateFunctionResponse); rpc DropFunction(DropFunctionRequest) returns (DropFunctionResponse); // pre aggregator interfaces rpc CreateAggregator(CreateAggregatorRequest) returns (CreateAggregatorResponse); // monitoring interfaces rpc GetAndFlushDeployStats(GAFDeployStatsRequest) returns (DeployStatsResponse); // flush privilege rpc FlushPrivileges(EmptyRequest) returns (GeneralResponse); }