Multipleinputs.addinputpath, pay attention.

Source: Internet
Author: User
Keywords Name time execution inside
Multipleinputs.addinputpath Note Blog Category: Hadoop hadoop&http://www.aliyun.com/zixun/aggregation/37954.html "> nbsp; Original, reprint please specify the Source:





use Multipleinputs.addinputpath to add multiple input sources (more than two):


multipleinputs.addinputpath (conf, new Path (Otheargs[0)), Textinputformat.class,joinnodemapper2.class); Multipleinputs.addinputpath (conf, new Path (otheargs[1)), Textinputformat.class,joinmemmapper2.class); Multipleinputs.addinputpath (conf, new Path (otheargs[2)), Textinputformat.class,joincpumapper2.class);


my file format is:


Otheargs[0] point to file format:


key1 Keyname1key2 keyname2


Otheargs[1] point to file format:


key1 Vala1key2 valA2


otheargs[2] point to file format:


key1 Valb1key2 valB2




When the
runs the specified parameters in Elipse, if OTHEARGS[2] is the same as otheargs[1, then multipleinputs only executes one of the addinputpath statements, and the result of my test environment is the execution


Multipleinputs.addinputpath (conf, new Path (otheargs[2)), Textinputformat.class,joincpumapper2.class);


1. Request otheargs[2] and otheargs[1] either.


2.reduce After the build file is:


key1 keyname1 vala1key2 keyname2 vala2key1 keyname1 valb1key2 keyname2 valB2


instead of:


key1 keyname1 valA1 valb1key2 keyname2 valA2 valB2


so to achieve the result of the second join, I 211.html "> feel that I still want to use the MapReduce job flow control."








Related Article

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.