Fail to Increase Hive Mapper Tasks?

后端 未结 2 1569
臣服心动
臣服心动 2021-01-16 06:38

I have a managed Hive table, which contains only one 150MB file. I then do \"select count(*) from tbl\" to it, and it uses 2 mappers. I want to set it to a bigger number.

相关标签:
2条回答
  • 2021-01-16 06:57

    Try adding the following:

    set hive.merge.mapfiles=false;
    set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
    
    0 讨论(0)
  • 2021-01-16 07:19

    I combined @javadba 's answer with that I received from Hive mailing list, here's the solution:

    set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
    set mapred.map.tasks = 20;
    select count(*) from dw_stage.st_dw_marketing_touch_pi_metrics_basic;
    

    From the mailing list:

    It seems that HIVE is using the old Hadoop MapReduce API and so mapred.max.split.size won't work.

    I would dig into source code later.

    0 讨论(0)
提交回复
热议问题