简体   繁体   中英

No of reducers in mapreduce hadoop

我只有一个从mapper发出的键到reducer,我没有设置减速器为10.因此一个减速器将在该键上运行,剩下的9个减速器会做什么?

The other 9 reducers will run through their lifecycle as normal, they just wont have any key/values to process once they run, so they will stop quickly. Thus you will waste resources while they needlessly run.

You'll generally (most output formats do this) also find you end up with a part file for a reduce that ran but didnt write anything. The part file won't contain any actual data just file metadata, for example gzip headers.

The other 9 reducers will run until their slot time ends.

They will not have any K/V pairs to process and stop quickly.

You can use custom partitioners to distribute the map outputs to all reducers evenly; - atleast for first level; and finalaly combine through one reducer at very last phase - thus reducing computing load in most of reduce phase.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM