forked from risingwavelabs/risingwave
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(connector): add connector remote sink (risingwavelabs#6493)
* add remote sink * pass connector_sink_endpoint thru CN opts instead * refactor remote sink * refactor connector params * fix source ci * Optionize source endpoint * fix proto lint * fix naming style linting * fix naming style linting * fix sinkerror parsing Co-authored-by: William Wen <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
e6c9116
commit 3474214
Showing
18 changed files
with
759 additions
and
37 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -9,4 +9,3 @@ echo "--- Check protobuf code format && Lint protobuf" | |
cd proto | ||
buf format -d --exit-code | ||
buf lint | ||
|
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,88 @@ | ||
syntax = "proto3"; | ||
|
||
package connector_service; | ||
|
||
import "data.proto"; | ||
|
||
option java_outer_classname = "ConnectorServiceProto"; | ||
option java_package = "com.risingwave.proto"; | ||
|
||
message SinkConfig { | ||
message TableSchema { | ||
message Column { | ||
string name = 1; | ||
data.DataType.TypeName data_type = 2; | ||
} | ||
repeated Column columns = 1; | ||
repeated uint32 pk_indices = 2; | ||
} | ||
string sink_type = 1; | ||
map<string, string> properties = 2; | ||
TableSchema table_schema = 3; | ||
} | ||
|
||
message SinkStreamRequest { | ||
message StartSink { | ||
SinkConfig sink_config = 1; | ||
} | ||
|
||
message WriteBatch { | ||
message JsonPayload { | ||
message RowOp { | ||
data.Op op_type = 1; | ||
string line = 2; | ||
} | ||
repeated RowOp row_ops = 1; | ||
} | ||
|
||
oneof payload { | ||
JsonPayload json_payload = 1; | ||
} | ||
|
||
uint64 batch_id = 3; | ||
uint64 epoch = 4; | ||
} | ||
|
||
message StartEpoch { | ||
uint64 epoch = 1; | ||
} | ||
|
||
message SyncBatch { | ||
uint64 epoch = 1; | ||
} | ||
|
||
oneof request { | ||
StartSink start = 1; | ||
StartEpoch start_epoch = 2; | ||
WriteBatch write = 3; | ||
SyncBatch sync = 4; | ||
} | ||
} | ||
|
||
message SinkResponse { | ||
message SyncResponse { | ||
uint64 epoch = 1; | ||
} | ||
|
||
message StartEpochResponse { | ||
uint64 epoch = 1; | ||
} | ||
|
||
message WriteResponse { | ||
uint64 epoch = 1; | ||
uint64 batch_id = 2; | ||
} | ||
|
||
message StartResponse {} | ||
|
||
oneof response { | ||
SyncResponse sync = 2; | ||
StartEpochResponse start_epoch = 3; | ||
WriteResponse write = 4; | ||
StartResponse start = 5; | ||
} | ||
} | ||
|
||
service ConnectorService { | ||
rpc SinkStream(stream SinkStreamRequest) returns (stream SinkResponse); | ||
} |
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
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
Oops, something went wrong.