当前位置:网站首页>MapReduce中分区数与ReduceTask个数关系比较
MapReduce中分区数与ReduceTask个数关系比较
2022-07-26 04:21:00 【QYHuiiQ】
在MapReduce中如果不设置ReduceTask个数时,默认为1;如果我们使用了自定义分区,那么同时也需要在主类中设置ReduceTask个数,此时要注意分区个数与ReduceTask个数之间的不同组合会产生以下不同结果:
- 当ReduceTask个数(n)>分区个数(m),会产生m个实际输出文件和(n-m)个空白输出文件。
- 当1<ReduceTask个数(n)<分区个数(m),导致部分区分在写出文件时不知道要放到哪个ReduceTask对应的结果中去,因为分区个数超过了ReduceTask个数。此时会抛异常:IO异常。
- 当ReduceTask个数(n)=1时,无论分区个数为几,所有分区结果全部放在同一个输出文件中。
- 在自定义分区中定义分区编号时,要特别注意,分区编号必须从1开始,并且步长为1。
边栏推荐
- I.MX6U-ALPHA开发板(GPIO中断实验)
- Where does international crude oil open an account, a formal, safe and secure platform
- Sweet butter
- (translation) the button position convention can strengthen the user's usage habits
- When you try to delete all bad code in the program | daily anecdotes
- SwiftUI一日速成
- 理性认知教育机器人寓教于乐的辅助作用
- [oi knowledge] dichotomy, dichotomy concept, integer dichotomy, floating point dichotomy
- Use of anonymous functions
- What are the duplicate check rules for English papers?
猜你喜欢

Steam科学教育赋予课堂教学的创造力

Comprehensive evaluation and decision-making method

How does win11 set the theme color of the status bar? Win11 method of setting theme color of status bar

Firewall command simple operation

低成本、快速、高效搭建数字藏品APP、H5系统,扇贝科技专业开发更放心!

Wu Enda's machine learning after class exercises - linear regression

(translation) the button position convention can strengthen the user's usage habits

MySQL - multi table query - Cartesian product sum, correct multi table query, equivalent connection and unequal connection, inner connection and outer connection

Which websites can I visit to check the latest medical literature?

建设面向青少年的创客教育实验室
随机推荐
Unable to find sygwin.s file during vscode debugging
Makefile knowledge rearrangement (super detailed)
红星美凯龙高负债之下,盯上新能源了?
Educational Codeforces Round 132 (Rated for Div. 2) E. XOR Tree
dijango学习
Support proxy direct connection to Oracle database, jumpserver fortress v2.24.0 release
再获认可 | 赛宁网安连续上榜《CCSIP 2022中国网络安全产业全景图》
1. If function of Excel
Dijikstra (preprocessing first) +dfs, relocation truncated to fit
Segger embedded studio cannot find xxx.c or xxx.h file
[C language foundation] 13 preprocessor
Functions of anonymous functions
Solution: runtimeerror: expected object of scalar type int but got scalar type double
Scroll view pull-down refresh and pull-up load (bottom)
Acwing brush questions
动态规划 爬楼梯
Which websites can I visit to check the latest medical literature?
当你尝试删除程序中所有烂代码时 | 每日趣闻
机器学习之信用卡欺诈检测
VM virtual machine has no un bridged host network adapter, unable to restore the default configuration