-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: define remote_engine grpc service (#505)
Co-authored-by: kamille <34352236+Rachelint@users.noreply.github.com>
- Loading branch information
1 parent
72d3542
commit 6139d89
Showing
5 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// Copyright 2022 CeresDB Project Authors. Licensed under Apache-2.0. | ||
|
||
syntax = "proto3"; | ||
package remote_engine; | ||
|
||
import "common.proto"; | ||
|
||
message ResponseHeader { | ||
uint32 code = 1; | ||
string error = 2; | ||
} | ||
|
||
service RemoteEngineService { | ||
rpc Read(ReadRequest) returns (stream ReadResponse) {} | ||
rpc Write(WriteRequest) returns (WriteResponse) {} | ||
} | ||
|
||
message TableIdentifier { | ||
string catalog = 1; | ||
string schema = 2; | ||
string table = 3; | ||
} | ||
|
||
message ReadOptions { | ||
uint64 batch_size = 1; | ||
uint64 read_parallelism = 2; | ||
} | ||
|
||
message Projection { | ||
repeated uint64 idx = 1; | ||
} | ||
|
||
message ProjectedSchema { | ||
common.TableSchema table_schema = 1; | ||
Projection projection = 2; | ||
} | ||
|
||
message Predicate { | ||
repeated bytes exprs = 1; | ||
common.TimeRange time_range = 2; | ||
} | ||
|
||
enum ReadOrder { | ||
None = 0; | ||
Asc = 1; | ||
Desc = 2; | ||
} | ||
|
||
message TableReadRequest { | ||
uint64 request_id = 1; | ||
ReadOptions opts = 2; | ||
ProjectedSchema projected_schema = 3; | ||
Predicate predicate = 4; | ||
ReadOrder order = 5; | ||
} | ||
|
||
message ReadRequest { | ||
TableIdentifier table = 1; | ||
TableReadRequest read_request = 2; | ||
} | ||
|
||
message ReadResponse { | ||
ResponseHeader header = 1; | ||
repeated bytes rows = 2; | ||
} | ||
|
||
message RowGroup { | ||
common.TableSchema table_schema = 1; | ||
repeated bytes rows = 2; | ||
int64 min_timestamp = 3; | ||
int64 max_timestamp = 4; | ||
} | ||
|
||
message WriteRequest { | ||
TableIdentifier table = 1; | ||
RowGroup row_group = 2; | ||
} | ||
|
||
message WriteResponse { | ||
ResponseHeader header = 1; | ||
uint64 affected_rows = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ pub mod sst; | |
pub mod sys_catalog; | ||
pub mod table_requests; | ||
pub mod wal_on_mq; | ||
pub mod remote_engine; |