Help Center/ MapReduce Service/ Component Operation Guide (LTS)/ Using Impala/ Impala FAQ/ What Should I Do If the Class Path of a UDF Cannot Be Found in Impala?
Updated on 2025-07-16 GMT+08:00

What Should I Do If the Class Path of a UDF Cannot Be Found in Impala?

Question

During normal use of Impala, an error is reported for a UDF that the class path cannot be found. In Hive, this UDF can be used properly, but in Impala the class path cannot be found.

Answer

By default, Impala caches the JAR package corresponding to the UDF to the /tmp directory, which is controlled by the --local_library_dir configuration item. The files in the /tmp directory are deleted by the OS after being stored for a certain period of time, resulting in a class missing error during Impala query.

Log in to FusionInsight Manager, choose Cluster > Services > Impala, and click Configurations and then All Configurations. In the tab, choose Impalad(Role) > Customization. Add the parameter --local_library_dir to impalad.customized.configs and set its value to a directory where the omm user has read and write permissions. Save the configuration and restart the instance whose configuration expired.