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/08/14 08:14:22 UTC

[GitHub] [inlong] gong opened a new pull request, #5539: [INLONG-5459][Sort] Add Audit for mysql extract node

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

   ### Prepare a Pull Request
   
   - [INLONG-5459][Sort] Add Audit for mysql extract node
   
   - Fixes #5459 
   
   ### Motivation
   
   Add Audit for mysql extract node
   
   ### Modifications
   
   * Add inlong audit option for mysql cdc connector
   * Add audit computing for mysql extract node
   


-- 
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 a diff in pull request #5539: [INLONG-5459][Sort] Add Audit for mysql extract node

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


##########
inlong-sort/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/mysql/table/MySqlTableSource.java:
##########
@@ -182,7 +185,8 @@ public MySqlTableSource(
             Properties jdbcProperties,
             Duration heartbeatInterval,
             boolean migrateAll,
-            String inlongMetric) {
+            String inLongMetric,

Review Comment:
   Please change it to `inlongXxx`, thanks.



-- 
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 a diff in pull request #5539: [INLONG-5459][Sort] Add Audit for mysql extract node

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


##########
inlong-sort/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/debezium/DebeziumSourceFunction.java:
##########
@@ -408,12 +417,17 @@ public void run(SourceContext<T> sourceContext) throws Exception {
                 (Gauge<Long>) () -> debeziumChangeFetcher.getEmitDelay());
         metricGroup.gauge(
                 "sourceIdleTime", (Gauge<Long>) () -> debeziumChangeFetcher.getIdleTime());
-        if (StringUtils.isNotEmpty(this.inlongMetric)) {
-            String[] inlongMetricArray = inlongMetric.split(Constants.DELIMITER);
-            String groupId = inlongMetricArray[0];
-            String streamId = inlongMetricArray[1];
-            String nodeId = inlongMetricArray[2];
-            sourceMetricData = new SourceMetricData(groupId, streamId, nodeId, metricGroup);
+        if (StringUtils.isNotEmpty(this.inLongMetric)) {
+            String[] inLongMetricArray = inLongMetric.split(Constants.DELIMITER);

Review Comment:
   Please keep the naming of `inlongMetric` and `inlongMetricArray`, and change the `inLongAudit` to `inlongAudit`, thanks.



##########
inlong-sort/sort-connectors/base/src/main/java/org/apache/inlong/sort/base/util/ValidateMetricOptionUtils.java:
##########
@@ -0,0 +1,39 @@
+/*
+ *   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.base.util;
+
+import org.apache.flink.table.api.ValidationException;
+
+/**
+ * validate option tool
+ */
+public class ValidateMetricOptionUtils {
+
+    /**
+     * validate inlong metric when set inlong audit
+     * @param inLongMetric

Review Comment:
   1. Use `inlongMetric`, `inlongAudit`.
   2. Add a description for each param, thanks.



##########
inlong-sort/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/mysql/source/metrics/MySqlSourceReaderMetrics.java:
##########
@@ -59,6 +61,10 @@ public class MySqlSourceReaderMetrics {
     private static String STREAM_ID = "streamId";
     private static String GROUP_ID = "groupId";
     private static String NODE_ID = "nodeId";
+    private String inLongGroupId;

Review Comment:
   Please change to `inlongGroupId` and `inlongStreamId`.



-- 
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 #5539: [INLONG-5459][Sort] Add Audit for mysql extract node

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


##########
inlong-sort/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/mysql/table/MySqlTableSource.java:
##########
@@ -182,7 +185,8 @@ public MySqlTableSource(
             Properties jdbcProperties,
             Duration heartbeatInterval,
             boolean migrateAll,
-            String inlongMetric) {
+            String inLongMetric,

Review Comment:
   done



-- 
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 #5539: [INLONG-5459][Sort] Add Audit for mysql extract node

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


##########
inlong-sort/sort-connectors/base/src/main/java/org/apache/inlong/sort/base/util/ValidateMetricOptionUtils.java:
##########
@@ -0,0 +1,39 @@
+/*
+ *   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.base.util;
+
+import org.apache.flink.table.api.ValidationException;
+
+/**
+ * validate option tool
+ */
+public class ValidateMetricOptionUtils {
+
+    /**
+     * validate inlong metric when set inlong audit
+     * @param inLongMetric

Review Comment:
   done



-- 
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 merged pull request #5539: [INLONG-5459][Sort] Add audit for MySQL extract node

Posted by GitBox <gi...@apache.org>.
dockerzhang merged PR #5539:
URL: https://github.com/apache/inlong/pull/5539


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