1. 修复探测功能初次探测后,影响配置的问题。
2. 修复采集任务异常时,某些状态未处理的问题。
3. 修复数据插入TdEngine时转义的问题。
4. 修复开发环境读取探测配置文件时路径错误的问题
This commit is contained in:
WalkerLee
2022-02-09 16:07:14 +08:00
committed by random-chat
parent 7df74fc482
commit a394bd6cac
4 changed files with 26 additions and 7 deletions

View File

@@ -138,7 +138,7 @@ public class TdEngineDataStorage implements DisposableBean {
if (CommonConstants.NULL_VALUE.equals(value)) {
sqlRowBuffer.append("NULL");
} else {
sqlRowBuffer.append("'").append(value).append("'");
sqlRowBuffer.append("'").append(formatStringValue(value)).append("'");
}
}
if (index != fields.size() - 1) {
@@ -197,7 +197,9 @@ public class TdEngineDataStorage implements DisposableBean {
}
}
private String formatStringValue(String value){
return value.replaceAll("(\\\\)|(')","\\\\$0");
}
@Override
public void destroy() throws Exception {
if (hikariDataSource != null) {