This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 98b8f445d [INLONG-7353][Agent] Fix error of PostgreSQL connector
(#7354)
98b8f445d is described below
commit 98b8f445d76d06151f8751caa36682dd366214bd
Author: haifxu <[email protected]>
AuthorDate: Sun Feb 12 12:02:10 2023 +0800
[INLONG-7353][Agent] Fix error of PostgreSQL connector (#7354)
---
.../apache/inlong/agent/plugin/sources/reader/PostgreSQLReader.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/sources/reader/PostgreSQLReader.java
b/inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/sources/reader/PostgreSQLReader.java
index bee613d23..f740a40fa 100644
---
a/inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/sources/reader/PostgreSQLReader.java
+++
b/inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/sources/reader/PostgreSQLReader.java
@@ -28,7 +28,6 @@ import org.apache.inlong.agent.conf.JobProfile;
import org.apache.inlong.agent.constant.AgentConstants;
import org.apache.inlong.agent.constant.PostgreSQLConstants;
import org.apache.inlong.agent.message.DefaultMessage;
-import org.apache.inlong.agent.metrics.AgentMetricItem;
import org.apache.inlong.agent.metrics.audit.AuditUtils;
import org.apache.inlong.agent.plugin.Message;
import org.apache.inlong.agent.plugin.sources.snapshot.PostgreSQLSnapshotBase;
@@ -73,7 +72,6 @@ public class PostgreSQLReader extends AbstractReader {
private static final Gson GSON = new Gson();
private static final Logger LOGGER =
LoggerFactory.getLogger(PostgreSQLReader.class);
private final AgentConfiguration agentConf =
AgentConfiguration.getAgentConf();
- protected AgentMetricItem readerMetric;
private String userName;
private String password;
private String hostName;
@@ -196,6 +194,7 @@ public class PostgreSQLReader extends AbstractReader {
props.setProperty("connector.class",
PostgresConnector.class.getCanonicalName());
props.setProperty("database.server.name", serverName);
props.setProperty("plugin.name", pluginName);
+ props.setProperty("slot.name", "slot" + instanceId);
props.setProperty("database.hostname", hostName);
props.setProperty("database.port", port);
props.setProperty("database.user", userName);