Hadoop MapReduce: default number of mappers

前端 未结 2 1390
星月不相逢
星月不相逢 2021-01-14 05:27

If I don\'t specify the number of mappers, how would the number be determined? Is there a default setting read from a configuration file (such as mapred-site.xml)?

2条回答
  •  孤街浪徒
    2021-01-14 05:52

    It depends on a number of factors:

    • Input format and particular configuration properties for the format
    • for file based input formats (TextInputFormat, SequenceFileInputFormat etc):
      • Number of input files / paths
      • are the files splittable (typically compressed files are not, SequenceFiles are an exception to this)
      • block size of the files

    There are probably more, but you hopefully get the idea

提交回复
热议问题