This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch test-4
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/test-4 by this push:
new 37cf66b7d6e fix
37cf66b7d6e is described below
commit 37cf66b7d6e7cad5a4873302b49c1e1cd269e148
Author: Steve Yurong Su <[email protected]>
AuthorDate: Fri Jun 20 15:59:55 2025 +0800
fix
---
example/udf/src/main/java/org/apache/iotdb/udf/GoodUDTF.java | 2 +-
.../plan/execution/config/executor/ClusterConfigTaskExecutor.java | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/example/udf/src/main/java/org/apache/iotdb/udf/GoodUDTF.java
b/example/udf/src/main/java/org/apache/iotdb/udf/GoodUDTF.java
index fa8011d4c33..5eda61b685f 100644
--- a/example/udf/src/main/java/org/apache/iotdb/udf/GoodUDTF.java
+++ b/example/udf/src/main/java/org/apache/iotdb/udf/GoodUDTF.java
@@ -43,7 +43,7 @@ public class GoodUDTF implements UDTF {
@Override
public Optional<Exception> validate() {
// nothing to validate here, this UDTF is always valid
- LOGGER.info("GoodUDTF: OS info test {}", System.getProperty("os.name"));
+ LOGGER.info("GoodUDTF validation passed.");
return Optional.empty();
}
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
index 32ef65a6f1d..5dfd00c9c4f 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
@@ -260,6 +260,7 @@ import org.apache.iotdb.udf.api.exception.UDFException;
import com.google.common.util.concurrent.SettableFuture;
import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.thrift.TException;
import org.apache.thrift.transport.TTransportException;
import org.apache.tsfile.utils.ReadWriteIOUtils;
@@ -577,12 +578,13 @@ public class ClusterConfigTaskExecutor implements
IConfigTaskExecutor {
TimeUnit.MILLISECONDS);
} catch (final Exception e) {
// If the validation fails, we set the exception to the future
+ Throwable t = ExceptionUtils.getRootCause(e);
LOGGER.warn(
"Failed to validate UDF class [{}] for function [{}] in sandbox,
reason: {}",
createFunctionStatement.getClassName(),
createFunctionStatement.getUdfName(),
- e.getMessage(),
- e);
+ t.getMessage(),
+ t);
future.setException(
new IoTDBException(
"Failed to validate UDF class '"
@@ -590,7 +592,7 @@ public class ClusterConfigTaskExecutor implements
IConfigTaskExecutor {
+ "' for function '"
+ createFunctionStatement.getUdfName()
+ "', reason: "
- + e.getMessage(),
+ + t.getMessage(),
TSStatusCode.UDF_LOAD_CLASS_ERROR.getStatusCode()));
return Optional.of(future);
}