首页 > 解决方案 > 如何使用 tez 更改带有 ORC 文件的映射器数量?

问题描述

我正在尝试增加地图任务的数量。文件格式为 ORC,使用 TEZ 进行处理。

我有一个 2.8 GB 的文件。大约 128 MB 文件和文件数量约为 29。

每次我执行 28 个地图任务时都会执行。我正在尝试增加地图任务数。

提前致谢

标签: hadooporcapache-tez

解决方案


检查这些设置(见下面的评论):

set hive.tez.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;

set tez.grouping.min-size=16777216; -- files with smaller size will be combined if possible
set tez.grouping.max-size=67108864; -- (default is 1 Gb), files with bigger size will be splitted and more mappers started

您还可以使用此设置控制映射器的数量:

set mapreduce.job.maps=128; --better use grouping splits configuration (above) instead of this one because it is more flexible

推荐阅读