Three methods for adding jar files for udfudafudtf and other functions in Hive

Source: Internet
Author: User
After the jar file of the udfudafudtf function of hive is developed, you must put the jar file into the hive environment for use. You can add the following three methods:

After the jar file of the hive udf udaf udtf function is developed, you must put the jar file into the hive environment. You can add the following three methods:

After the jar file of the hive udf udaf udtf function is developed, you must put the jar file into the hive environment. You can add the following three methods:

1. Use the add jar path/test. jar; Method to add

The disadvantage of this method is that it must be added again every time Hive is started, and exiting hive will become invalid.

2. Add by setting the hive profile hive-site.xml

Add configuration in the configuration file


Hive. aux. jars. path
File: // jarpath/all_new1.jar, file: // jarpath/all_new2.jar

Save it.

This method is much more convenient than the first method. You do not need to add the Hive execution command every time, but the configuration is slightly more complicated.

3. Create the folder auxlib in $ {HIVE_HOME and put the custom jar file into the folder.

I personally recommend this method, which is convenient and quick.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.