| -- hive 动态分区 set?hive.exec.dynamic.partition=true; -- 非严格模式 set?hive.exec.dynamic.partition.mode=nonstrict; -- NodeManager中一个长期运行的辅助服务,用于提升Shuffle计算性能。 set?spark.shuffle.service.enabled=true; -- 开启动态资源配置 set?spark.dynamicAllocation.enabled=true; -- 动态分配最小executor个数 set?spark.dynamicAllocation.minExecutors=30; -- 动态分配最大executor个数 set?spark.dynamicAllocation.maxExecutors=300; -- executor核数 set?spark.executor.cores=2; -- executor内存大小 set?spark.executor.memory=3g; -- 控制输入文件块的大小,影响并行度 set?spark.hadoop.mapreduce.input.fileinputformat.split.minsize=33554432; set?spark.hadoop.mapreduce.input.fileinputformat.split.maxsize=67108864; -- shuffle并行度 set?spark.sql.shuffle.partitions=600; -- 开启 spark 的自适应执行 set?spark.sql.adaptive.enabled=true; -- 开启 spark 的自适应执行后,该参数控制shuffle 阶段的平均输入数据大小,防止产生过多的task。 set?spark.sql.adaptive.shuffle.targetPostShuffleInputSize=128000000; -- 开启推测执行 set?spark.speculation=true; -- 任务延迟的比例,比如当70%的task都完成,那么取他们运行时间的中位数跟还未执行完的任务作对比。如果超过1.2倍,则开启推测执行。 set?spark.speculation.quantile=0.7 set?spark.speculation.multiplier=1.2; |