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

add splitShard and mergeShard #12

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
17 changes: 17 additions & 0 deletions hstream.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ service HStreamApi {

// Shard APIs
rpc ListShards(ListShardsRequest) returns (ListShardsResponse) {}
rpc SplitShards(SplitShardsRequest) returns (SplitShardsResponse) {}
rpc MergeShards(MergeShardsRequest) returns (MergeShardsResponse) {}

// Subscribe APIs
rpc CreateSubscription(Subscription) returns (Subscription) {}
Expand Down Expand Up @@ -289,6 +291,21 @@ message ListShardsRequest { string streamName = 1; }

message ListShardsResponse { repeated Shard shards = 1; }

message SplitShardsRequest {
string streamName = 1;
bool halfSplit = 2;
string splitKey = 3;
}

message SplitShardsResponse { repeated Shard shards = 1; }

message MergeShardsRequest {
string streamName = 1;
repeated string shardKeys = 2;
}

message MergeShardsResponse { Shard shard = 1; }

message TerminateQueriesRequest {
repeated string queryId = 1;
bool all = 2;
Expand Down