Hadoop 中 map任务数,reduce任务数 和机器节点数之间是啥关系

根据Google发布的论文MapReduce: Simplified Data Processing on Large Clustershttp://static.googleusercontent.com/media/research.google.com/zh-CN//archive/mapreduce-osdi04.pdf这里引用3.5 TaskGranularity的一小段,下文中M代表map任务数,R代表reduce任务数Furthermore, R is often constrained by users because the output of each reduce task ends up in a separate output fi le. In practice, we tend to choose M so that each individual task is roughly 16 MB to 64 MB of input data(so that the locality optimization described above is most effective), and we make R a small multiple of the number of worker machines we expect to use. We often perform MapReduce computations with M = 200,000 and R = 5,000, using 2,000 worker machines.总的来说map任务数倾向于把输入文件可以分割成16MB到64MB之间,因为这刚好是GFS每个分块文件的大小,可以减少数据在网络中流动reduce任务数通常是机器节点数的小倍数至于机器节点数?有钱就要任性,多多益善。。
■网友
map一般根据文件大小切割成每个如64m.然后jobtracker启动相应数量的map任务,map数大于机器数的话,显然某些机器上就会跑多个任务的。而reduce是对map输出进行汇总统计,一般用到的节点是map的子集。
■网友
节点数就是机器数一个节点上可以跑多个虚拟机,一个虚拟机可以跑多个map/reduce任务
■网友
人与人


    推荐阅读