diff --git a/inlong-audit/audit-sdk/README.md b/inlong-audit/audit-sdk/README.md index 86cefc0e4c4..2689dbb463f 100644 --- a/inlong-audit/audit-sdk/README.md +++ b/inlong-audit/audit-sdk/README.md @@ -15,14 +15,14 @@ which can ensure that each module is reconciled in accordance with the unified a - The Audit SDK will summarize the results according to the cycle and send them to the ip:port list set by the interface. - There are two ways to set the address of the Audit Proxy, configure the address directly or get the address from the manager. Please choose one of the methods. - #### Configure Audit Proxy Addresses by fixed ip:port If the ip:port of the AuditProxy is fixed, then this interface needs to be called once. -If the AuditProxy changes in real time, then the business program needs to call this interface periodically to update +If the AuditProxy changes in real time, then the business program needs to call this interface periodically to update. ```java HashSet ipPortList = new HashSet<>(); ipPortList.add("0.0.0.0:54041"); AuditOperator.getInstance().setAuditProxy(ipPortList); +``` #### Configure Audit Proxy Addresses by InLong Manager By configuring the InLong Manager's address, module information, and manager certification information, The Audit SDK will automatically fetch the Manager to obtain the address of the Audit Proxy. @@ -65,7 +65,6 @@ public enum AuditComponent { Call the add method for statistics, where the auditID parameter uniquely identifies an audit object, inlongGroupID,inlongStreamID,logTime are audit dimensions, count is the number of items, size is the size, and logTime is milliseconds. - #### Example for Agent to Add Audit Data ```java AuditOperator.getInstance().add(auditID, auditTag, inlongGroupID, inlongStreamID, logTime, @@ -78,7 +77,6 @@ The scenario of supplementary recording of agent data, so the version number par count, size, auditVersion); ``` The scenario of supplementary recording of DataProxy data, so the version number parameter needs to be passed in. - #### Example for Sort Flink to Add Audit Data ```java AuditReporterImpl auditReporter=new AuditReporterImpl(); @@ -97,7 +95,6 @@ The scenario of supplementary recording of DataProxy data, so the version number logTime, count, size, auditVersion) ``` In order to ensure the accuracy of auditing, each operator needs to create an auditAuditReporterImpl instance. - - Explain of AuditDimensions | parameter | description | diff --git a/inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/AuditIdEnum.java b/inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/AuditIdEnum.java index db8dd4a0292..8186e981817 100644 --- a/inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/AuditIdEnum.java +++ b/inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/AuditIdEnum.java @@ -40,7 +40,7 @@ import static org.apache.inlong.audit.entity.AuditType.POSTGRES; import static org.apache.inlong.audit.entity.AuditType.SDK; import static org.apache.inlong.audit.entity.AuditType.STARROCKS; -import static org.apache.inlong.audit.entity.AuditType.TUBE_MQ; +import static org.apache.inlong.audit.entity.AuditType.TUBEMQ; import static org.apache.inlong.audit.entity.FlowType.INPUT; import static org.apache.inlong.audit.entity.FlowType.OUTPUT; @@ -91,8 +91,8 @@ public enum AuditIdEnum { SORT_BINLOG_INPUT(35, INPUT, BINLOG, "Received Audit Metrics for Sort Binlog"), SORT_BINLOG_OUTPUT(36, OUTPUT, BINLOG, "Sent Audit Metrics for Sort Binlog"), - SORT_TUBE_INPUT(33, INPUT, TUBE_MQ, "Received Audit Metrics for Sort Tube"), - SORT_TUBE_OUTPUT(34, OUTPUT, TUBE_MQ, "Sent Audit Metrics for Sort Tube"), + SORT_TUBE_INPUT(33, INPUT, TUBEMQ, "Received Audit Metrics for Sort TubeMQ"), + SORT_TUBE_OUTPUT(34, OUTPUT, TUBEMQ, "Sent Audit Metrics for Sort TubeMQ"), SORT_MYSQL_INPUT(35, INPUT, MYSQL, "Received Audit Metrics for Sort MySQL"), SORT_MYSQL_OUTPUT(36, OUTPUT, MYSQL, "Sent Audit Metrics for Sort MySQL"), diff --git a/inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/entity/AuditType.java b/inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/entity/AuditType.java index 8ef9d631453..3b195b82149 100644 --- a/inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/entity/AuditType.java +++ b/inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/entity/AuditType.java @@ -33,7 +33,7 @@ public enum AuditType { KUDU("Kudu"), POSTGRES("Postgres"), BINLOG("MYSQL_BINLOG"), - TUBE_MQ("TubeMQ"), + TUBEMQ("TubeMQ"), MYSQL("MYSQL_SQL"), HDFS("HDFS");