如何限制Hive作业中的地图制作者数量?

时间:2017-05-23 14:09:28

标签: hadoop hive mapr

在我的三节点集群中,我已经优化了性能所需的所有参数。但这对我的情况没有多大帮助, 当我的团队尝试从外部表加载到内部表时,我们所有的hive表都是用镶木地板格式创建的, 请找到下面的脚本,

ksh -c 'hadoop fs -rm -R 
 hdfs:///user/hive/warehouse/bistore_sit_cycle2.db/wt_consumer/d_partition_number=0;
        hive -e  "set hive.exec.dynamic.partition.mode=nonstrict;
        insert into bistore_sit_cycle2.wt_consumer
        partition(d_partition_number)
        select * from bistore_sit_cycle2.ext_wt_consumer;
        set hive.exec.dynamic.partition.mode=strict;"'

加载需要2个多小时,使用718映射器创建的hive作业并在每个节点上运行2个容器,同时只有5个映射器运行此作业。 负载是85M记录和35GB左右。

如何使用较少的映射器运行这样的作业以及如何增加运行映射器的并发性!!! ???

And this is my complete Cluster and YARN configuration details,

CPU: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz (16 physical cores)(32 hyper threaded) 
RAM:256GB 
DISK:1.2TB x 16
MapR 5.0.0 - Community Edition
        mapreduce.map.memory.mb=10g
        mapreduce.reduce.memory.mb=16g
        yarn.app.mapreduce.am.resource.mb=16g
        yarn.app.mapreduce.am.command-opts=15g
        yarn.app.mapreduce.am.resource.cpu-vcores=16
        mapreduce.map.cpu.vcores=12
        mapreduce.reduce.cpu.vcores=16
        mapreduce.map.disk=1.5
        mapreduce.reduce.disk=3.99
        mapreduce.map.java.opts=9g
        mapreduce.reduce.java.opts=15g
        mapreduce.task.io.sort.mb=1024
        mapreduce.task.io.sort.factor=1024
        mapreduce.reduce.shuffle.parallelcopies=48
        yarn.nodemanager.resource.memory-mb=180g
        yarn.scheduler.maximum-allocation-mb=180g
        yarn.scheduler.minimum-allocation-mb=4g
        yarn.nodemanager.resource.cpu-vcores=32
        yarn.nodemanager.vmem-pmem-ratio=3.2
        HADOOP_CLIENT_OPTS=32g

1 个答案:

答案 0 :(得分:0)

为配置单元查询生成的映射器数量取决于输入拆分。您有35 GB的数据,并且您将获得718个映射器。这意味着您的分割大小约为49 MB(35 * 1024/718)。您的群集只有三个节点,根据您的YARN容器大小设置,它最多只能生成5个容器。为了增加并行性,您需要添加更多容器,即垂直或水平扩展群集节点。更多的数字或映射器是提高性能所需要的,更少的映射器意味着更少的并行性。