How to call a third-party jar package in the map function or reduce Function

Source: Internet
Author: User

Generally, when a third-party jar package is called in mapreduce programs, the jar package cannot be found. Check that the jar package is in the corresponding path and the mapreduce task cannot be found. If you think about it, you will find that the jar package is stored in the memory on the machine where the mapreduce main program is executed, generally the client machine. When we call the jar package in the map or reduce function, it is called in the memory on the machine in the cluster. How can this be called. You can use the following methods:

1. Place the jar package on the daily machine of the cluster in advance.

2. Like a cluster that calls the MySQL driver, first put the jar package into HDFS and then distribute the jar package to each machine through MySQL's distributedcache.


How to call a third-party jar package in the map function or reduce Function

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.