You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by go...@apache.org on 2021/12/14 12:14:34 UTC
[incubator-inlong] branch master updated: [INLONG-1980][Bug][InLong-Dataproxy] the content of topics.properties generated incorrectly,and too much backup files generate automatically (#1986)
This is an automated email from the ASF dual-hosted git repository.
gosonzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 3e331ab [INLONG-1980][Bug][InLong-Dataproxy] the content of topics.properties generated incorrectly,and too much backup files generate automatically (#1986)
3e331ab is described below
commit 3e331ab6cb6124b50e83a77972658daadb1c680c
Author: ziruipeng <zp...@connect.ust.hk>
AuthorDate: Tue Dec 14 20:14:28 2021 +0800
[INLONG-1980][Bug][InLong-Dataproxy] the content of topics.properties generated incorrectly,and too much backup files generate automatically (#1986)
---
.../java/org/apache/inlong/dataproxy/config/RemoteConfigJson.java | 4 ++--
.../apache/inlong/dataproxy/config/holder/PropertiesConfigHolder.java | 1 -
.../apache/inlong/dataproxy/config/remote/ConfigMessageServlet.java | 4 ++--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/RemoteConfigJson.java b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/RemoteConfigJson.java
index 91b5413..44fe3b5 100644
--- a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/RemoteConfigJson.java
+++ b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/RemoteConfigJson.java
@@ -35,12 +35,12 @@ public class RemoteConfigJson {
public static class DataItem {
- private String groupId;
+ private String inlongGroupId;
private String topic;
private String m;
public String getGroupId() {
- return groupId;
+ return inlongGroupId;
}
public String getTopic() {
diff --git a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/holder/PropertiesConfigHolder.java b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/holder/PropertiesConfigHolder.java
index fc90c7d..39914ed 100644
--- a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/holder/PropertiesConfigHolder.java
+++ b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/holder/PropertiesConfigHolder.java
@@ -99,7 +99,6 @@ public class PropertiesConfigHolder extends ConfigHolder {
if (sourceFile.exists()) {
FileUtils.copyFile(sourceFile, targetFile);
}
-
List<String> lines = getStringListFromHolder(tmpHolder);
FileUtils.writeLines(tmpNewFile, lines);
diff --git a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/remote/ConfigMessageServlet.java b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/remote/ConfigMessageServlet.java
index b6f46da..88cc890 100644
--- a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/remote/ConfigMessageServlet.java
+++ b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/remote/ConfigMessageServlet.java
@@ -56,7 +56,7 @@ public class ConfigMessageServlet extends HttpServlet {
private boolean handleTopicConfig(RequestContent requestContent) {
Map<String, String> groupIdToTopic = new HashMap<String, String>();
for (Map<String, String> item : requestContent.getContent()) {
- groupIdToTopic.put(item.get("groupId"), item.get("topic"));
+ groupIdToTopic.put(item.get("inlongGroupId"), item.get("topic"));
}
if ("add".equals(requestContent.getOperationType())) {
return configManager.addTopicProperties(groupIdToTopic);
@@ -69,7 +69,7 @@ public class ConfigMessageServlet extends HttpServlet {
private boolean handleMxConfig(RequestContent requestContent) {
Map<String, String> groupIdToMValue = new HashMap<String, String>();
for (Map<String, String> item : requestContent.getContent()) {
- groupIdToMValue.put(item.get("groupId"), item.get("m"));
+ groupIdToMValue.put(item.get("inlongGroupId"), item.get("m"));
}
if ("add".equals(requestContent.getOperationType())) {
return configManager.addMxProperties(groupIdToMValue);