【发布时间】:2017-10-23 13:05:34
【问题描述】:
在我的三节点集群中,我已经优化了性能所需的所有参数。但这对我来说没有多大帮助, 我们所有的 hive 表都是用 parquet 格式创建的,当我的团队尝试从外部表加载到内部表时, 请在下面找到脚本,
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 个多小时,hive 作业使用 718 个映射器创建并在每个节点上运行 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
【问题讨论】:
-
“我们所有的 hive 表都是用 parquet 格式创建的” >> 甚至是 EXTERNAL 文件???
-
如果您的输入是 CSV 文件,您可以告诉 Hive 为每个 Mapper 处理多个小文件——请参阅下面的评论
-
您也可以尝试减小容器大小——对于特定情况,即使使用
CombineInputFormat,默认值也可能过高。 -
检查默认容器大小,
set mapreduce.map.memory.mb ; set mapreduce.reduce.memory.mb ; set yarn.app.mapreduce.am.resource.mb ;cf。 hadoop.apache.org/docs/r2.7.2/hadoop-mapreduce-client/… >> 还有set hive.tez.container.size ;如果您使用的是 TEZ,请参阅。 cwiki.apache.org/confluence/display/Hive/… -
Duh...
yarn.app.mapreduce.am.command-opts看起来不像您在 Java 命令行上传递的任何东西;我想知道为什么 YARN AppMaster 需要 16 GB 和 16 个(虚拟)内核来做,好吧,除了启动和监控 Map & Reduce 容器之外什么都没有。这就是你所说的“优化”吗?!?