Search in sources :

Example 1 with TaskDivideConfig

use of org.apache.rocketmq.connect.jdbc.config.TaskDivideConfig in project rocketmq-externals by apache.

the class JdbcSinkConnector method taskConfigs.

@Override
public List<KeyValue> taskConfigs() {
    log.info("List.start");
    if (!configValid) {
        return new ArrayList<KeyValue>();
    }
    startMQAdminTools();
    buildRoute();
    TaskDivideConfig tdc = new TaskDivideConfig(this.dbConnectorConfig.getDbUrl(), this.dbConnectorConfig.getDbPort(), this.dbConnectorConfig.getDbUserName(), this.dbConnectorConfig.getDbPassword(), this.dbConnectorConfig.getConverter(), DataType.COMMON_MESSAGE.ordinal(), this.dbConnectorConfig.getTaskParallelism(), this.dbConnectorConfig.getMode());
    ((SinkDbConnectorConfig) this.dbConnectorConfig).setTopicRouteMap(topicRouteMap);
    return this.dbConnectorConfig.getTaskDivideStrategy().divide(this.dbConnectorConfig, tdc);
}
Also used : ArrayList(java.util.ArrayList) SinkDbConnectorConfig(org.apache.rocketmq.connect.jdbc.config.SinkDbConnectorConfig) TaskDivideConfig(org.apache.rocketmq.connect.jdbc.config.TaskDivideConfig)

Aggregations

ArrayList (java.util.ArrayList)1 SinkDbConnectorConfig (org.apache.rocketmq.connect.jdbc.config.SinkDbConnectorConfig)1 TaskDivideConfig (org.apache.rocketmq.connect.jdbc.config.TaskDivideConfig)1