This is an automated email from the ASF dual-hosted git repository.

yinyijun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git


The following commit(s) were added to refs/heads/master by this push:
     new b5789538e6 [feat] Add `QueryExecutor` does not support 
internationalization. (#3565)
b5789538e6 is described below

commit b5789538e61e6ccb54b89002acd04b8b4107b9c4
Author: Duansg <[email protected]>
AuthorDate: Thu Jul 10 20:04:15 2025 +0800

    [feat] Add `QueryExecutor` does not support internationalization. (#3565)
---
 .../org/apache/hertzbeat/alert/service/impl/DataSourceServiceImpl.java  | 2 +-
 hertzbeat-alerter/src/main/resources/alerter_en_US.properties           | 1 +
 hertzbeat-alerter/src/main/resources/alerter_zh_CN.properties           | 1 +
 hertzbeat-alerter/src/main/resources/alerter_zh_TW.properties           | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/service/impl/DataSourceServiceImpl.java
 
b/hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/service/impl/DataSourceServiceImpl.java
index ed6d563dd9..d41c4a8671 100644
--- 
a/hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/service/impl/DataSourceServiceImpl.java
+++ 
b/hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/service/impl/DataSourceServiceImpl.java
@@ -75,7 +75,7 @@ public class DataSourceServiceImpl implements 
DataSourceService {
             throw new IllegalArgumentException("Empty expression");
         }
         if (executors == null || executors.isEmpty()) {
-            throw new IllegalArgumentException("No query executor found");
+            throw new 
IllegalArgumentException(bundle.getString("alerter.datasource.executor.not.found"));
         }
         QueryExecutor executor = executors.stream().filter(e -> 
e.support(datasource)).findFirst().orElse(null);
 
diff --git a/hertzbeat-alerter/src/main/resources/alerter_en_US.properties 
b/hertzbeat-alerter/src/main/resources/alerter_en_US.properties
index ea802aead6..bd7851d06e 100644
--- a/hertzbeat-alerter/src/main/resources/alerter_en_US.properties
+++ b/hertzbeat-alerter/src/main/resources/alerter_en_US.properties
@@ -33,3 +33,4 @@ alerter.priority.0 = Emergency Alert
 alerter.priority.1 = Critical Alert
 alerter.priority.2 = Warning Alert
 alerter.calculate.parse.error = Expression is not fully parsed, may have 
syntax errors or incomplete inputs
+alerter.datasource.executor.not.found = No query executor found
diff --git a/hertzbeat-alerter/src/main/resources/alerter_zh_CN.properties 
b/hertzbeat-alerter/src/main/resources/alerter_zh_CN.properties
index 7630aa1510..bc4398b918 100644
--- a/hertzbeat-alerter/src/main/resources/alerter_zh_CN.properties
+++ b/hertzbeat-alerter/src/main/resources/alerter_zh_CN.properties
@@ -33,3 +33,4 @@ alerter.priority.0 = 紧急告警
 alerter.priority.1 = 严重告警
 alerter.priority.2 = 警告告警
 alerter.calculate.parse.error = 表达式未完全解析,可能存在语法错误或输入不完整
+alerter.datasource.executor.not.found = 未找到查询执行器
diff --git a/hertzbeat-alerter/src/main/resources/alerter_zh_TW.properties 
b/hertzbeat-alerter/src/main/resources/alerter_zh_TW.properties
index e368df42d3..6878bf06f6 100644
--- a/hertzbeat-alerter/src/main/resources/alerter_zh_TW.properties
+++ b/hertzbeat-alerter/src/main/resources/alerter_zh_TW.properties
@@ -33,3 +33,4 @@ alerter.priority.0 = 緊急警報
 alerter.priority.1 = 嚴重警報
 alerter.priority.2 = 警告警報
 alerter.calculate.parse.error = 表達式未完全解析,可能存在語法錯誤或輸入不完整
+alerter.datasource.executor.not.found = 未找到查詢執行器


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to