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/11/17 03:56:57 UTC

[GitHub] [inlong] yunqingmoswu commented on a diff in pull request #6541: [INLONG-6495][Sort] Support inlong metrics for single table doris and support metric restore for it

yunqingmoswu commented on code in PR #6541:
URL: https://github.com/apache/inlong/pull/6541#discussion_r1024724961


##########
inlong-sort/sort-connectors/doris/pom.xml:
##########
@@ -16,8 +16,8 @@
   ~ limitations under the License.
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0"

Review Comment:
   Don't update the format!



##########
inlong-sort/sort-connectors/doris/src/main/java/org/apache/inlong/sort/doris/table/DorisDynamicSchemaOutputFormat.java:
##########
@@ -123,18 +153,48 @@ public DorisDynamicSchemaOutputFormat(DorisOptions option,
             String tablePattern,
             boolean ignoreSingleTableErrors,
             String inlongMetric,
-            String auditHostAndPorts) {
+            String auditHostAndPorts,
+            boolean isSingle) {
         this.options = option;
         this.readOptions = readOptions;
         this.executionOptions = executionOptions;
         this.dynamicSchemaFormat = dynamicSchemaFormat;
         this.databasePattern = databasePattern;
         this.tablePattern = tablePattern;
         this.ignoreSingleTableErrors = ignoreSingleTableErrors;
+        this.isSingle = isSingle;
         this.inlongMetric = inlongMetric;
         this.auditHostAndPorts = auditHostAndPorts;
     }
 
+    public DorisDynamicSchemaOutputFormat(DorisOptions option,
+            DorisReadOptions readOptions,
+            DorisExecutionOptions executionOptions,
+            String tableIdentifier,
+            LogicalType[] logicalTypes,
+            String[] fieldNames,
+            String inlongMetric,
+            String auditHostAndPorts,
+            boolean isSingle) {
+        this.options = option;
+        this.readOptions = readOptions;
+        this.executionOptions = executionOptions;
+        this.tableIdentifier = tableIdentifier;
+        this.fieldNames = fieldNames;
+        this.isSingle = isSingle;
+        this.inlongMetric = inlongMetric;
+        this.auditHostAndPorts = auditHostAndPorts;
+
+        this.jsonFormat = FORMAT_JSON_VALUE.equals(executionOptions.getStreamLoadProp().getProperty(FORMAT_KEY));
+        this.keysType = parseKeysType();

Review Comment:
   It is recommended to handle it in the method of 'open()'



##########
inlong-sort/sort-connectors/doris/src/main/java/org/apache/inlong/sort/doris/table/DorisDynamicSchemaOutputFormat.java:
##########
@@ -123,18 +153,48 @@ public DorisDynamicSchemaOutputFormat(DorisOptions option,
             String tablePattern,
             boolean ignoreSingleTableErrors,
             String inlongMetric,
-            String auditHostAndPorts) {
+            String auditHostAndPorts,
+            boolean isSingle) {

Review Comment:
   'isSingle' is not necessary to define, there is already a definition of multiple-sink?



-- 
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