hive on spark 常用配置


常用設置

reset;
set hive.execution.engine=spark;
set hive.map.aggr = false;
set hive.auto.convert.join = false;
set hive.merge.mapfiles=true;
set hive.merge.mapredfiles=true;
set hive.merge.size.per.task=100000000;
-- 動態分區參數
SET hive.exec.dynamic.partition=TRUE;
SET hive.exec.dynamic.partition.mode=nonstrict;
SET hive.exec.max.dynamic.partitions=100000;
SET hive.exec.max.dynamic.partitions.pernode=100000;
-- 資源參數,根據任務調整
-- spark引擎參數
set spark.executor.cores=2;
set spark.executor.memory=4G;
set spark.executor.instances=10;

任務占用資源計算

cores : 核心數

executor.memory :單個excutor分配內存

executor.instances=10:executor個數

任務占用總核心數:2 * 10 + 1 = 21  1是driver占用的核數

占用總內存:2 * 4 * 10 = 40


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM