我要评分
获取效率
正确性
完整性
易理解

Adding the Hive UDF Plugin

To push down UDFs written based on the Hive UDF framework to the OmniData service, install the OmniData Hive UDF plugin.

  1. On the local host, decompress the boostkit-omnidata-hive-udf-loader-1.6.1-1.4.0-aarch64.zip package obtained in Table 3. The boostkit-omnidata-hive-udf-loader-1.6.1-1.4.0-aarch64 folder is generated.
  2. After installing OmniData, copy the boostkit-omnidata-hive-udf-loader-1.6.1-1.4.0-aarch64 folder to the plugin directory under the OmniData installation directory, for example, /home/omm/omnidata-install/omnidata.
  3. Configure the Hive UDF plugin.

    Add hive.properties to the etc/function-namespace directory under the OmniData installation directory /home/omm/omnidata-install/omnidata to configure the Hive UDF plugin. The file name can be changed, but the file name extension cannot be changed.

    The hive.properties file contains the following configuration items:

    1
    2
    3
    function-namespace-manager.name=hive-functions
    external-functions.dir=/home/omm/hive_udf_directory
    AES256Decrypt com.huawei.udf.AES256DecryptUDF
    
    Table 1 Parameters in hive.properties

    Parameter

    Recommended Value

    Description

    function-namespace-manager.name

    hive-functions

    Plugin name, which cannot be changed. The value can only be hive-functions.

    external-functions.dir

    /home/omm/hive_udf_directory

    Path of the UDF JAR package written based on the Hive UDF framework and its dependencies. You can set this parameter to any absolute path on which the installation user has the read and write permissions.

    AES256Decrypt com.huawei.udf.AES256DecryptUDF

    N/A

    The first value is the function name, and the second value is the full path class name (package name + class name) of the function. You need to add the corresponding configuration for each UDF.

    • If you modify parameter settings or add new UDFs in the configuration file, restart OmniData for the modification to take effect.
    • Ensure that the permission on the configuration file is 640.