Skip to content

Commit

Permalink
[INLONG-10481][Audit] Optimize Audit domain management
Browse files Browse the repository at this point in the history
  • Loading branch information
doleyzi committed Jun 21, 2024
1 parent e7dd1d0 commit dd27fd3
Show file tree
Hide file tree
Showing 14 changed files with 124 additions and 548 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

public enum AuditComponent {

AGENT("Agent"), DATAPROXY("DataProxy"), SORT("Sort"), COMMON_AUDIT("Common");
AGENT("Agent"), DATAPROXY("DataProxy"), SORT("Sort");
private final String component;

/**
Expand Down
3 changes: 3 additions & 0 deletions inlong-audit/audit-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ ENV AUDIT_JDBC_URL=127.0.0.1:3306
ENV AUDIT_JDBC_USERNAME=root
ENV AUDIT_JDBC_PASSWORD=inlong

# Audit Proxy host
ENV AUDIT_PROXY_HOST=127.0.0.1:10081

# jvm
ENV AUDIT_JVM_HEAP_OPTS="-XX:+UseContainerSupport -XX:InitialRAMPercentage=40.0 -XX:MaxRAMPercentage=80.0 -XX:-UseAdaptiveSizePolicy"
WORKDIR /opt/inlong-audit
Expand Down
3 changes: 3 additions & 0 deletions inlong-audit/audit-docker/audit-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ sed -i "s/audit.store.jdbc.password=.*$/audit.store.jdbc.password=${AUDIT_JDBC_P
sed -i "s/mysql.jdbc.url=.*$/mysql.jdbc.url=jdbc:mysql:\/\/${AUDIT_JDBC_URL}\/${AUDIT_DBNAME}/g" "${service_conf_file}"
sed -i "s/mysql.jdbc.username=.*$/mysql.jdbc.username=${AUDIT_JDBC_USERNAME}/g" "${service_conf_file}"
sed -i "s/mysql.jdbc.password=.*$/mysql.jdbc.password=${AUDIT_JDBC_PASSWORD}/g" "${service_conf_file}"
sed -i "s/audit.proxy.host.list.agent=.*$/audit.proxy.host.list.agent = ${AUDIT_PROXY_HOST}/g" "${service_conf_file}"
sed -i "s/audit.proxy.host.list.dataproxy=.*$/audit.proxy.host.list.dataproxy = ${AUDIT_PROXY_HOST}/g" "${service_conf_file}"
sed -i "s/audit.proxy.host.list.sort=.*$/audit.proxy.host.list.sort = ${AUDIT_PROXY_HOST}/g" "${service_conf_file}"

# Whether the database table exists. If it does not exist, initialize the database and skip if it exists.
if [[ "${AUDIT_JDBC_URL}" =~ (.+):([0-9]+) ]]; then
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.apache.inlong.audit.node;

import org.apache.inlong.audit.file.ConfigManager;
import org.apache.inlong.audit.heartbeat.Heartbeat;

import com.google.common.base.Throwables;
import com.google.common.collect.Lists;
Expand Down Expand Up @@ -77,8 +76,6 @@ public class Application {
private MonitorService monitorServer;
private final ReentrantLock lifecycleLock = new ReentrantLock();

private static final Heartbeat heartbeat = new Heartbeat();

public Application() {
this(new ArrayList<LifecycleAware>(0));
}
Expand Down Expand Up @@ -338,8 +335,6 @@ public static void main(String[] args) {
application.handleConfigurationEvent(configurationProvider.getConfiguration());
}

heartbeat.Start();

// start application
application.start();

Expand Down
Loading

0 comments on commit dd27fd3

Please sign in to comment.