[cdc-cli][cdc-composer] Use "source-table" and "sink-table" as keywords of route (#2823)

pull/2829/head
Qingsheng Ren 1 year ago committed by GitHub
parent 73086c4f37
commit 6cb2ffe2fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,8 +49,8 @@ public class YamlPipelineDefinitionParser implements PipelineDefinitionParser {
private static final String NAME_KEY = "name"; private static final String NAME_KEY = "name";
// Route keys // Route keys
private static final String ROUTE_SOURCE_TABLE_KEY = "sourceTable"; private static final String ROUTE_SOURCE_TABLE_KEY = "source-table";
private static final String ROUTE_SINK_TABLE_KEY = "sinkTable"; private static final String ROUTE_SINK_TABLE_KEY = "sink-table";
private static final String ROUTE_DESCRIPTION_KEY = "description"; private static final String ROUTE_DESCRIPTION_KEY = "description";
private final ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); private final ObjectMapper mapper = new ObjectMapper(new YAMLFactory());

@ -30,11 +30,11 @@ sink:
auto-create-table: true auto-create-table: true
route: route:
- sourceTable: mydb.default.app_order_.* - source-table: mydb.default.app_order_.*
sinkTable: odsdb.default.app_order sink-table: odsdb.default.app_order
description: sync all sharding tables to one description: sync all sharding tables to one
- sourceTable: mydb.default.web_order - source-table: mydb.default.web_order
sinkTable: odsdb.default.ods_web_order sink-table: odsdb.default.ods_web_order
description: sync table to with given prefix ods_ description: sync table to with given prefix ods_
transform: transform:

@ -25,8 +25,8 @@ sink:
bootstrap-servers: localhost:9092 bootstrap-servers: localhost:9092
route: route:
- sourceTable: mydb.default.app_order_.* - source-table: mydb.default.app_order_.*
sinkTable: odsdb.default.app_order sink-table: odsdb.default.app_order
pipeline: pipeline:
parallelism: 4 parallelism: 4

@ -27,8 +27,8 @@ import java.util.Optional;
* <p>A router definition contains: * <p>A router definition contains:
* *
* <ul> * <ul>
* <li>matcher: a regex pattern for matching input table IDs. Required for the definition. * <li>sourceTable: a regex pattern for matching input table IDs. Required for the definition.
* <li>replace: a string for replacing matched table IDs as output. Required for the definition. * <li>sinkTable: a string for replacing matched table IDs as output. Required for the definition.
* <li>description: description for the router. Optional for the definition. * <li>description: description for the router. Optional for the definition.
* </ul> * </ul>
*/ */
@ -58,9 +58,9 @@ public class RouteDef {
@Override @Override
public String toString() { public String toString() {
return "RouteDef{" return "RouteDef{"
+ "matcher=" + "sourceTable="
+ sourceTable + sourceTable
+ ", replace=" + ", sinkTable="
+ sinkTable + sinkTable
+ ", description='" + ", description='"
+ description + description

Loading…
Cancel
Save