You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2023/01/05 02:12:41 UTC

[iotdb] branch IOTDB-4933 created (now b8f6ae7cf3)

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

jackietien pushed a change to branch IOTDB-4933
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at b8f6ae7cf3 [IOTDB-4933] More detailed error message for udf/trigger executor and fix typo in udf doc

This branch includes the following new commits:

     new b8f6ae7cf3 [IOTDB-4933] More detailed error message for udf/trigger executor and fix typo in udf doc

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: [IOTDB-4933] More detailed error message for udf/trigger executor and fix typo in udf doc

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch IOTDB-4933
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit b8f6ae7cf3919e9c98f5a1f5d69d2e1f1c9459bd
Author: Liao Lanyu <14...@qq.com>
AuthorDate: Thu Jan 5 10:09:52 2023 +0800

    [IOTDB-4933] More detailed error message for udf/trigger executor and fix typo in udf doc
    
    (cherry picked from commit 11c489bc254d47137e028e8135be10ac7ed0f290)
---
 docs/UserGuide/Operators-Functions/User-Defined-Function.md        | 2 +-
 docs/zh/UserGuide/Operators-Functions/User-Defined-Function.md     | 2 +-
 .../apache/iotdb/db/mpp/transformation/dag/udf/UDTFExecutor.java   | 7 +++++--
 .../java/org/apache/iotdb/db/trigger/executor/TriggerExecutor.java | 2 +-
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/docs/UserGuide/Operators-Functions/User-Defined-Function.md b/docs/UserGuide/Operators-Functions/User-Defined-Function.md
index 5684bf578e..235a32be9c 100644
--- a/docs/UserGuide/Operators-Functions/User-Defined-Function.md
+++ b/docs/UserGuide/Operators-Functions/User-Defined-Function.md
@@ -538,7 +538,7 @@ For more user permissions related content, please refer to [Account Management S
 
 ## Configurable Properties
 
-You can use `trigger_lib_dir` to config trigger lib directory.  
+You can use `udf_lib_dir` to config udf lib directory.  
 When querying by a UDF, IoTDB may prompt that there is insufficient memory. You can resolve the issue by configuring `udf_initial_byte_array_length_for_memory_control`, `udf_memory_budget_in_mb` and `udf_reader_transformer_collector_memory_proportion` in `iotdb-datanode.properties` and restarting the server.
 
 
diff --git a/docs/zh/UserGuide/Operators-Functions/User-Defined-Function.md b/docs/zh/UserGuide/Operators-Functions/User-Defined-Function.md
index 4ed98d07ed..1347874778 100644
--- a/docs/zh/UserGuide/Operators-Functions/User-Defined-Function.md
+++ b/docs/zh/UserGuide/Operators-Functions/User-Defined-Function.md
@@ -489,7 +489,7 @@ SHOW FUNCTIONS
 
 ## 配置项
 
-使用配置项 `trigger_lib_dir` 来配置 trigger 的存储目录.  
+使用配置项 `udf_lib_dir` 来配置 udf 的存储目录.  
 在 SQL 语句中使用自定义函数时,可能提示内存不足。这种情况下,您可以通过更改配置文件`iotdb-datanode.properties`中的`udf_initial_byte_array_length_for_memory_control`,`udf_memory_budget_in_mb`和`udf_reader_transformer_collector_memory_proportion`并重启服务来解决此问题。
 
 ## 贡献 UDF
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/transformation/dag/udf/UDTFExecutor.java b/server/src/main/java/org/apache/iotdb/db/mpp/transformation/dag/udf/UDTFExecutor.java
index ea8a64bcd5..c86faef2d0 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/transformation/dag/udf/UDTFExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/transformation/dag/udf/UDTFExecutor.java
@@ -149,10 +149,13 @@ public class UDTFExecutor {
   }
 
   private void onError(String methodName, Exception e) {
-    LOGGER.warn("Error occurred during executing UDTF", e);
+    LOGGER.warn(
+        "Error occurred during executing UDTF, perhaps need to check whether the implementation of UDF is correct according to the udf-api description.",
+        e);
     throw new RuntimeException(
         String.format(
-                "Error occurred during executing UDTF#%s: %s", methodName, System.lineSeparator())
+                "Error occurred during executing UDTF#%s: %s, perhaps need to check whether the implementation of UDF is correct according to the udf-api description.",
+                methodName, System.lineSeparator())
             + e);
   }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerExecutor.java b/server/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerExecutor.java
index 308d71ae60..7283729af0 100644
--- a/server/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerExecutor.java
@@ -100,7 +100,7 @@ public class TriggerExecutor {
       throws TriggerExecutionException {
     String errorMessage =
         String.format(
-                "Error occurred during executing Trigger(%s)#%s: %s",
+                "Error occurred during executing Trigger(%s)#%s: %s, perhaps need to check whether the implementation of Trigger is correct according to the trigger-api description.",
                 triggerInformation.getTriggerName(), methodName, System.lineSeparator())
             + t;
     LOGGER.warn(errorMessage);