You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/12/05 08:30:55 UTC

[GitHub] [inlong] liaorui opened a new pull request, #6741: [INLONG-6740][Sort][Manager]StarRocks connector supports transferring all tables for all schemas in one database

liaorui opened a new pull request, #6741:
URL: https://github.com/apache/inlong/pull/6741

   ### Prepare a Pull Request
   *(Change the title refer to the following example)*
   
   - Title Example: [INLONG-XYZ][Component] Title of the pull request
   
   *(The following *XYZ* should be replaced by the actual [GitHub Issue](https://github.com/apache/inlong/issues) number)*
   
   - Fixes #6740
   
   ### Motivation
   
   *Explain here the context, and why you're making that change. What is the problem you're trying to solve?*
   
   Inspired by doris-cdc-inlong, starrocks-cdc-inlong can also support transferring all tables in one database on time.
   
   StarRocks FE api has changed, been different from Doris FE api. If you use doris-cdc-inlong to handle StarRocks tables writing, it will give a error: http://x.x.x.x:xxxx/api/backends?is_alive=true failed. java.io.IOException: Failed to get response from Doris. That is why we need a sarrocks-cdc-inlong connector.
   
   Based on starrocks-cdc of community,  starrocks-cdc-inlong has improved all tables writing in one database one time.
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   1.  StarRocksDynamicSinkFunction's invoke method supports handling debezium canal-json upstream parsing. It picks data from upstream, assembles data with json format.
   
   2. StarRocksSinkManager's init method will only validate table structure in single table transferring, and skip validating in all database migration.
   
   3. StarRocksStreamLoadVisitor's checkLabelState method add `String database` parameter.
   
   4. StarRocksSinkManager removes checkFlushException method invoking in waitAsyncFlushingDone, close and flushInternal methods. If there is a error when writing to StarRocks, flink cdc will fail to make a checkpoint because of this error.
   
   ### Verifying this change
   
   *(Please pick either of the following options)*
   
   - [ ] This change is a trivial rework/code cleanup without any test coverage.
   
   - [ ] This change is already covered by existing tests, such as:
     *(please describe tests)*
   
   - [ ] This change added tests and can be verified as follows:
   
     *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] yunqingmoswu commented on a diff in pull request #6741: [INLONG-6740][Sort][Manager]StarRocks connector supports transferring all tables for all schemas in one database

Posted by GitBox <gi...@apache.org>.
yunqingmoswu commented on code in PR #6741:
URL: https://github.com/apache/inlong/pull/6741#discussion_r1040631394


##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/constant/StarRocksConstant.java:
##########
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.sort.protocol.constant;
+
+/**
+ * StarRocks options constant
+ */
+public class StarRocksConstant {
+
+    /**
+     * 'connector' = 'starrocks-inlong'
+     */
+    public static final String CONNECTOR = "connector";
+
+    /**
+     * Host of the stream load like: `jdbc:mysql://fe_ip1:query_port,fe_ip2:query_port...`.
+     */
+    public static final String JDBC_URL = "jdbc-url";
+
+    /**
+     * Host of the stream load like: `fe_ip1:http_port;fe_ip2:http_port;fe_ip3:http_port`.
+     */
+    public static final String LOAD_URL = "load-url";
+
+    /**
+     * StarRocks user name.
+     */
+    public static final String USERNAME = "username";
+
+    /**
+     * StarRocks user password.
+     */
+    public static final String PASSWORD = "password";
+
+    /**
+     * StarRocks stream load format, support json and csv.
+     */
+    public static final String FORMAT = "sink.properties.format";
+
+    /**
+     * StarRocks stream load strip outer array for json format.
+     */
+    public static final String STRIP_OUTER_ARRAY = "sink.properties.strip_outer_array";
+
+    /**
+     * Database name of the stream load.
+     */
+    public static final String DATABASE_NAME = "database-name";
+
+    /**
+     * Table name of the stream load.
+     */
+    public static final String TABLE_NAME = "table-name";
+
+    /**
+     * The multiple enable of sink
+     */
+    public static final String SINK_MULTIPLE_ENABLE = "sink.multiple.enable";
+
+    /**
+     * The multiple format of sink
+     */
+    public static final String SINK_MULTIPLE_FORMAT = "sink.multiple.format";

Review Comment:
   can be extracted in the general constant class?



##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/constant/StarRocksConstant.java:
##########
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.sort.protocol.constant;
+
+/**
+ * StarRocks options constant
+ */
+public class StarRocksConstant {
+
+    /**
+     * 'connector' = 'starrocks-inlong'
+     */
+    public static final String CONNECTOR = "connector";
+
+    /**
+     * Host of the stream load like: `jdbc:mysql://fe_ip1:query_port,fe_ip2:query_port...`.
+     */
+    public static final String JDBC_URL = "jdbc-url";
+
+    /**
+     * Host of the stream load like: `fe_ip1:http_port;fe_ip2:http_port;fe_ip3:http_port`.
+     */
+    public static final String LOAD_URL = "load-url";
+
+    /**
+     * StarRocks user name.
+     */
+    public static final String USERNAME = "username";
+
+    /**
+     * StarRocks user password.
+     */
+    public static final String PASSWORD = "password";
+
+    /**
+     * StarRocks stream load format, support json and csv.
+     */
+    public static final String FORMAT = "sink.properties.format";
+
+    /**
+     * StarRocks stream load strip outer array for json format.
+     */
+    public static final String STRIP_OUTER_ARRAY = "sink.properties.strip_outer_array";
+
+    /**
+     * Database name of the stream load.
+     */
+    public static final String DATABASE_NAME = "database-name";
+
+    /**
+     * Table name of the stream load.
+     */
+    public static final String TABLE_NAME = "table-name";
+
+    /**
+     * The multiple enable of sink
+     */
+    public static final String SINK_MULTIPLE_ENABLE = "sink.multiple.enable";

Review Comment:
   can be extracted in the general constant class?



##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/constant/StarRocksConstant.java:
##########
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.sort.protocol.constant;
+
+/**
+ * StarRocks options constant
+ */
+public class StarRocksConstant {
+
+    /**
+     * 'connector' = 'starrocks-inlong'
+     */
+    public static final String CONNECTOR = "connector";
+
+    /**
+     * Host of the stream load like: `jdbc:mysql://fe_ip1:query_port,fe_ip2:query_port...`.
+     */
+    public static final String JDBC_URL = "jdbc-url";
+
+    /**
+     * Host of the stream load like: `fe_ip1:http_port;fe_ip2:http_port;fe_ip3:http_port`.
+     */
+    public static final String LOAD_URL = "load-url";
+
+    /**
+     * StarRocks user name.
+     */
+    public static final String USERNAME = "username";
+
+    /**
+     * StarRocks user password.
+     */
+    public static final String PASSWORD = "password";
+
+    /**
+     * StarRocks stream load format, support json and csv.
+     */
+    public static final String FORMAT = "sink.properties.format";
+
+    /**
+     * StarRocks stream load strip outer array for json format.
+     */
+    public static final String STRIP_OUTER_ARRAY = "sink.properties.strip_outer_array";
+
+    /**
+     * Database name of the stream load.
+     */
+    public static final String DATABASE_NAME = "database-name";
+
+    /**
+     * Table name of the stream load.
+     */
+    public static final String TABLE_NAME = "table-name";
+
+    /**
+     * The multiple enable of sink
+     */
+    public static final String SINK_MULTIPLE_ENABLE = "sink.multiple.enable";
+
+    /**
+     * The multiple format of sink
+     */
+    public static final String SINK_MULTIPLE_FORMAT = "sink.multiple.format";
+
+    /**
+     * The multiple database-pattern of sink
+     */
+    public static final String SINK_MULTIPLE_DATABASE_PATTERN = "sink.multiple.database-pattern";

Review Comment:
   can be extracted in the general constant class?



##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/constant/StarRocksConstant.java:
##########
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.sort.protocol.constant;
+
+/**
+ * StarRocks options constant
+ */
+public class StarRocksConstant {
+
+    /**
+     * 'connector' = 'starrocks-inlong'
+     */
+    public static final String CONNECTOR = "connector";
+
+    /**
+     * Host of the stream load like: `jdbc:mysql://fe_ip1:query_port,fe_ip2:query_port...`.
+     */
+    public static final String JDBC_URL = "jdbc-url";
+
+    /**
+     * Host of the stream load like: `fe_ip1:http_port;fe_ip2:http_port;fe_ip3:http_port`.
+     */
+    public static final String LOAD_URL = "load-url";
+
+    /**
+     * StarRocks user name.
+     */
+    public static final String USERNAME = "username";
+
+    /**
+     * StarRocks user password.
+     */
+    public static final String PASSWORD = "password";
+
+    /**
+     * StarRocks stream load format, support json and csv.
+     */
+    public static final String FORMAT = "sink.properties.format";
+
+    /**
+     * StarRocks stream load strip outer array for json format.
+     */
+    public static final String STRIP_OUTER_ARRAY = "sink.properties.strip_outer_array";
+
+    /**
+     * Database name of the stream load.
+     */
+    public static final String DATABASE_NAME = "database-name";
+
+    /**
+     * Table name of the stream load.
+     */
+    public static final String TABLE_NAME = "table-name";
+
+    /**
+     * The multiple enable of sink
+     */
+    public static final String SINK_MULTIPLE_ENABLE = "sink.multiple.enable";
+
+    /**
+     * The multiple format of sink
+     */
+    public static final String SINK_MULTIPLE_FORMAT = "sink.multiple.format";
+
+    /**
+     * The multiple database-pattern of sink
+     */
+    public static final String SINK_MULTIPLE_DATABASE_PATTERN = "sink.multiple.database-pattern";
+    /**
+     * The multiple table-pattern of sink
+     */
+    public static final String SINK_MULTIPLE_TABLE_PATTERN = "sink.multiple.table-pattern";

Review Comment:
   can be extracted in the general constant class?



##########
inlong-sort/sort-connectors/starrocks/src/main/java/org/apache/inlong/sort/starrocks/manager/StarRocksSinkManager.java:
##########
@@ -0,0 +1,579 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.sort.starrocks.manager;
+
+import com.starrocks.connector.flink.connection.StarRocksJdbcConnectionOptions;
+import com.starrocks.connector.flink.connection.StarRocksJdbcConnectionProvider;
+import com.starrocks.connector.flink.manager.StarRocksQueryVisitor;
+import com.starrocks.connector.flink.manager.StarRocksSinkBufferEntity;
+import com.starrocks.connector.flink.manager.StarRocksStreamLoadFailedException;
+import com.starrocks.connector.flink.table.sink.StarRocksSinkOptions;
+import com.starrocks.connector.flink.table.sink.StarRocksSinkSemantic;
+import java.io.IOException;
+import java.io.Serializable;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Executors;
+import java.util.concurrent.LinkedBlockingDeque;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+import org.apache.flink.api.common.functions.RuntimeContext;
+import org.apache.flink.metrics.Counter;
+import org.apache.flink.metrics.Histogram;
+import org.apache.flink.runtime.metrics.DescriptiveStatisticsHistogram;
+import org.apache.flink.runtime.util.ExecutorThreadFactory;
+import org.apache.flink.table.api.TableColumn;
+import org.apache.flink.table.api.TableSchema;
+import org.apache.flink.table.api.constraints.UniqueConstraint;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.inlong.sort.base.metric.SinkMetricData;
+import org.apache.inlong.sort.base.sink.SchemaUpdateExceptionPolicy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class StarRocksSinkManager implements Serializable {

Review Comment:
   Please add some comments.



##########
inlong-sort/sort-connectors/starrocks/src/main/java/org/apache/inlong/sort/starrocks/manager/StarRocksSinkManager.java:
##########
@@ -0,0 +1,579 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.sort.starrocks.manager;
+
+import com.starrocks.connector.flink.connection.StarRocksJdbcConnectionOptions;
+import com.starrocks.connector.flink.connection.StarRocksJdbcConnectionProvider;
+import com.starrocks.connector.flink.manager.StarRocksQueryVisitor;
+import com.starrocks.connector.flink.manager.StarRocksSinkBufferEntity;
+import com.starrocks.connector.flink.manager.StarRocksStreamLoadFailedException;
+import com.starrocks.connector.flink.table.sink.StarRocksSinkOptions;
+import com.starrocks.connector.flink.table.sink.StarRocksSinkSemantic;
+import java.io.IOException;
+import java.io.Serializable;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Executors;
+import java.util.concurrent.LinkedBlockingDeque;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+import org.apache.flink.api.common.functions.RuntimeContext;
+import org.apache.flink.metrics.Counter;
+import org.apache.flink.metrics.Histogram;
+import org.apache.flink.runtime.metrics.DescriptiveStatisticsHistogram;
+import org.apache.flink.runtime.util.ExecutorThreadFactory;
+import org.apache.flink.table.api.TableColumn;
+import org.apache.flink.table.api.TableSchema;
+import org.apache.flink.table.api.constraints.UniqueConstraint;
+import org.apache.flink.table.types.logical.LogicalTypeRoot;
+import org.apache.inlong.sort.base.metric.SinkMetricData;
+import org.apache.inlong.sort.base.sink.SchemaUpdateExceptionPolicy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class StarRocksSinkManager implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final Logger LOG = LoggerFactory.getLogger(StarRocksSinkManager.class);

Review Comment:
   LOG -> LOGGER



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] gong commented on a diff in pull request #6741: [INLONG-6740][Sort][Manager]StarRocks connector supports transferring all tables for all schemas in one database

Posted by GitBox <gi...@apache.org>.
gong commented on code in PR #6741:
URL: https://github.com/apache/inlong/pull/6741#discussion_r1040600749


##########
inlong-sort/sort-connectors/starrocks/src/main/java/org/apache/inlong/sort/starrocks/table/sink/StarRocksDynamicTableSinkFactory.java:
##########
@@ -0,0 +1,153 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.sort.starrocks.table.sink;
+
+import static org.apache.inlong.sort.base.Constants.INLONG_AUDIT;
+import static org.apache.inlong.sort.base.Constants.INLONG_METRIC;
+import static org.apache.inlong.sort.base.Constants.SINK_MULTIPLE_DATABASE_PATTERN;
+import static org.apache.inlong.sort.base.Constants.SINK_MULTIPLE_ENABLE;
+import static org.apache.inlong.sort.base.Constants.SINK_MULTIPLE_FORMAT;
+import static org.apache.inlong.sort.base.Constants.SINK_MULTIPLE_IGNORE_SINGLE_TABLE_ERRORS;
+import static org.apache.inlong.sort.base.Constants.SINK_MULTIPLE_SCHEMA_UPDATE_POLICY;
+import static org.apache.inlong.sort.base.Constants.SINK_MULTIPLE_TABLE_PATTERN;
+
+import com.starrocks.connector.flink.table.sink.StarRocksSinkOptions;
+import java.util.HashSet;
+import java.util.Set;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.table.api.TableSchema;
+import org.apache.flink.table.api.ValidationException;
+import org.apache.flink.table.connector.sink.DynamicTableSink;
+import org.apache.flink.table.factories.DynamicTableSinkFactory;
+import org.apache.flink.table.factories.FactoryUtil;
+import org.apache.flink.table.types.DataType;
+import org.apache.flink.table.types.logical.VarBinaryType;
+import org.apache.flink.table.utils.TableSchemaUtils;
+import org.apache.inlong.sort.base.format.DynamicSchemaFormatFactory;
+import org.apache.inlong.sort.base.sink.SchemaUpdateExceptionPolicy;
+
+public class StarRocksDynamicTableSinkFactory implements DynamicTableSinkFactory {
+
+    @Override
+    public DynamicTableSink createDynamicTableSink(Context context) {
+        final FactoryUtil.TableFactoryHelper helper = FactoryUtil.createTableFactoryHelper(this, context);
+        helper.validateExcept(StarRocksSinkOptions.SINK_PROPERTIES_PREFIX);
+        ReadableConfig options = helper.getOptions();
+        // validate some special properties
+        StarRocksSinkOptions sinkOptions = new StarRocksSinkOptions(options, context.getCatalogTable().getOptions());
+        sinkOptions.enableUpsertDelete();
+        TableSchema physicalSchema = TableSchemaUtils.getPhysicalSchema(context.getCatalogTable().getSchema());
+        boolean multipleSink = helper.getOptions().get(SINK_MULTIPLE_ENABLE);
+        String sinkMultipleFormat = helper.getOptions().getOptional(SINK_MULTIPLE_FORMAT).orElse(null);
+        String databasePattern = helper.getOptions().getOptional(SINK_MULTIPLE_DATABASE_PATTERN).orElse(null);
+        String tablePattern = helper.getOptions().getOptional(SINK_MULTIPLE_TABLE_PATTERN).orElse(null);
+        boolean ignoreSingleTableErrors = helper.getOptions().get(SINK_MULTIPLE_IGNORE_SINGLE_TABLE_ERRORS);
+        SchemaUpdateExceptionPolicy schemaUpdatePolicy = helper.getOptions().get(SINK_MULTIPLE_SCHEMA_UPDATE_POLICY);
+        String inlongMetric = helper.getOptions().getOptional(INLONG_METRIC).orElse(INLONG_METRIC.defaultValue());
+        String auditHostAndPorts = helper.getOptions().getOptional(INLONG_AUDIT).orElse(INLONG_AUDIT.defaultValue());
+
+        validateSinkMultiple(physicalSchema.toPhysicalRowDataType(),
+                multipleSink,
+                sinkMultipleFormat,
+                databasePattern,
+                tablePattern);
+
+        return new StarRocksDynamicTableSink(sinkOptions,
+                physicalSchema,
+                multipleSink,
+                sinkMultipleFormat,
+                databasePattern,
+                tablePattern,
+                ignoreSingleTableErrors,
+                inlongMetric,
+                auditHostAndPorts,
+                schemaUpdatePolicy);
+    }
+
+    @Override
+    public String factoryIdentifier() {
+        return "starrocks-inlong";
+    }

Review Comment:
   lost resource/META-INF/services file for this custom connector file



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] liaorui closed pull request #6741: [INLONG-6740][Sort][Manager]StarRocks connector supports transferring all tables for all schemas in one database

Posted by GitBox <gi...@apache.org>.
liaorui closed pull request #6741: [INLONG-6740][Sort][Manager]StarRocks connector supports transferring all tables for all schemas in one database
URL: https://github.com/apache/inlong/pull/6741


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] dockerzhang commented on pull request #6741: [INLONG-6740][Sort][Manager] StarRocks connector supports transferring all tables for all schemas in one database

Posted by GitBox <gi...@apache.org>.
dockerzhang commented on PR #6741:
URL: https://github.com/apache/inlong/pull/6741#issuecomment-1341863304

   split to #6746 and #6748, close it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on pull request #6741: [INLONG-6740][Sort][Manager]StarRocks connector supports transferring all tables for all schemas in one database

Posted by GitBox <gi...@apache.org>.
healchow commented on PR #6741:
URL: https://github.com/apache/inlong/pull/6741#issuecomment-1341069854

   @liaorui Suggest after merging #6746, commit the changes of the Sort module to this PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] gong commented on a diff in pull request #6741: [INLONG-6740][Sort][Manager]StarRocks connector supports transferring all tables for all schemas in one database

Posted by GitBox <gi...@apache.org>.
gong commented on code in PR #6741:
URL: https://github.com/apache/inlong/pull/6741#discussion_r1040598144


##########
inlong-sort/sort-connectors/starrocks/pom.xml:
##########
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements. See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>sort-connectors</artifactId>
+        <groupId>org.apache.inlong</groupId>
+        <version>1.5.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <name>Apache InLong - Sort-connector-starrocks</name>
+    <artifactId>sort-connector-starrocks</artifactId>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.inlong</groupId>
+            <artifactId>sort-connector-base</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.starrocks</groupId>
+            <artifactId>flink-connector-starrocks</artifactId>
+            <version>1.2.3_flink-${flink.minor.version}_${flink.scala.binary.version}</version>

Review Comment:
   version by ref ${starrocks-connector.version}



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] dockerzhang closed pull request #6741: [INLONG-6740][Sort][Manager] StarRocks connector supports transferring all tables for all schemas in one database

Posted by GitBox <gi...@apache.org>.
dockerzhang closed pull request #6741: [INLONG-6740][Sort][Manager] StarRocks connector supports transferring all tables for all schemas in one database
URL: https://github.com/apache/inlong/pull/6741


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] dockerzhang commented on pull request #6741: [INLONG-6740][Sort][Manager]StarRocks connector supports transferring all tables for all schemas in one database

Posted by GitBox <gi...@apache.org>.
dockerzhang commented on PR #6741:
URL: https://github.com/apache/inlong/pull/6741#issuecomment-1340507748

   due to @https://github.com/apache/inlong/pull/6746, do we need to remove all manager files for this PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org