MapReduce任务的数量 [英] Number of MapReduce tasks

查看:95
本文介绍了MapReduce任务的数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些帮助,了解如何在我的应用程序中获得正确数量的Map和Reduce任务。
有没有什么办法可以发现这个数字?



谢谢 >

映射器的数量取决于HDFS中的文件块大小(默认情况下)和输入分割大小(如果我们指定的不是默认值)。

如果假设您有128MB文件,并且hdfs块大小为64MB,那么由于默认行为,一些map任务将为2。

你的输入分割大小为32MB,但hdfs块大小为64MB,那么地图任务的时间数将为4.
因此,地图任务取决于上面定义的全部三个因子。


reduce任务的数量取决于 conf.seNumReduceTask(num)
mapreduce .job.reduces mapred.reduce.tasks 已弃用)。



I need some help about how it is possible to get the correct number of Map and Reduce tasks in my application. Is there any way to discover this number?

Thanks

解决方案

The number of mappers depends on the file block size in HDFS (by default) and input split size (If we specify other than default).

If suppose you have 128MB file is there and hdfs block size is 64MB then a number of map task will be 2 because of default behaviour.

And if your input split size is 32MB but hdfs block size is 64MB then that time number of map task will be 4. So, map task depends on the all three factor defined above.

The number of reduce task depends on conf.seNumReduceTask(num) or mapreduce.job.reduces (mapred.reduce.tasks is deprecated).

这篇关于MapReduce任务的数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆