diff --git a/be/src/agent/task_worker_pool.cpp b/be/src/agent/task_worker_pool.cpp index 345fc941c1b3b1..2e7756bff71016 100644 --- a/be/src/agent/task_worker_pool.cpp +++ b/be/src/agent/task_worker_pool.cpp @@ -2069,10 +2069,12 @@ void clean_trash_callback(StorageEngine& engine, const TAgentTaskRequest& req) { } void clean_udf_cache_callback(const TAgentTaskRequest& req) { - LOG(INFO) << "clean udf cache start: " << req.clean_udf_cache_req.function_signature; - static_cast( - JniUtil::clean_udf_class_load_cache(req.clean_udf_cache_req.function_signature)); - LOG(INFO) << "clean udf cache finish: " << req.clean_udf_cache_req.function_signature; + if (doris::config::enable_java_support) { + LOG(INFO) << "clean udf cache start: " << req.clean_udf_cache_req.function_signature; + static_cast( + JniUtil::clean_udf_class_load_cache(req.clean_udf_cache_req.function_signature)); + LOG(INFO) << "clean udf cache finish: " << req.clean_udf_cache_req.function_signature; + } } } // namespace doris