hive.exec.parallel 设置job并行执行

通过设置hive.exec.parallel参数,使得在同一sql中的job可以并行的执行,因为在某些场景下,同一sql中,有时子查询之间并无关联。

默认情况下为false

可以在执行HQL之前,set该参数,hive.exec.parallel=具体某个数值。

#####虽然可以保证并行运行,但是会耗费更多的资源。

时间: 2024-08-30 00:46:18

hive.exec.parallel 设置job并行执行的相关文章

Hive一些参数设置

在使用union all的时候,系统资源足够的情况下,为了加快hive处理速度,可以设置如下参数实现并发执行 set mapred.job.priority=VERY_HIGH; set hive.exec.parallel=true; 设置map reduce个数 -- 设置map capacity set mapred.job.map.capacity=2000; set mapred.job.reduce.capacity=2000; -- 设置每个reduce的大小 set hive.e

hive 动态分区数设置

当对hive分区未做设置时,报错如下: Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: [Error 20004]: Fatal error occurred when node tried to create too many dynamic partitions. The maximum number of dynamic partitions is controlled by hive.exec.max.d

Number of dynamic partitions exceeded hive.exec.max.dynamic.partitions.pernode

动态分区数太大的问题:[Fatal Error] Operator FS_2 (id=2): Number of dynamic partitions exceeded hive.exec.max.dynamic.partitions.pernode. hive> insert into table sogouq_test partition(query_time) select user_id,query_word,query_order,click_order,url,query_time

在hive中查询导入数据表时FAILED: SemanticException [Error 10096]: Dynamic partition strict mode requires at least one static partition column. To turn this off set hive.exec.dynamic.partition.mode=nonstrict

当我们出现这种情况时 FAILED: SemanticException [Error 10096]: Dynamic partition strict mode requires at least one static partition column. To turn this off set hive.exec.dynamic.partition.mode=nonstrict 这时候我们需要改变一下设置 set hive.exec.dynamici.partition=true;set h

hive Context类和DriverContext类

在hive的源码中经常可以看到Context类和DriverContext类,咋一看感觉这两个意思差不多,其实其作用区别还是蛮大的: org.apache.hadoop.hive.ql.Context类存储job的上下文信息,一个job创建一个Context对象,job运行完后,调用clear方法进行清除1)初始化/创建/删除中间目录中间的目录包括local job的和非local job的 protected int pathid = 10000; private static final S

hive常用参数配置设置

hive.exec.mode.local.auto 决定 Hive 是否应该自动地根据输入文件大小,在本地运行(在GateWay运行) true hive.exec.mode.local.auto.inputbytes.max 如果 hive.exec.mode.local.auto 为 true,当输入文件大小小于此阈值时可以自动在本地模式运行,默认是 128兆. 134217728L hive.exec.mode.local.auto.tasks.max 如果 hive.exec.mode.

Hive学习(九) 参数设置

Hive的参数设置方式 1.配置文件 (全局有效) 2.命令行参数(对 hive 启动实例有效) 3.参数声明 (对 hive 的连接 session 有效) (1)配置文件 Hive 的配置文件包括: A. 用户自定义配置文件:$HIVE_CONF_DIR/hive-site.xml B. 默认配置文件:$HIVE_CONF_DIR/hive-default.xml 用户自定义配置会覆盖默认配置. 另外,Hive 也会读入 Hadoop 的配置,因为 Hive 是作为 Hadoop 的客户端启

Hive数据倾斜总结

倾斜的原因: 使map的输出数据更均匀的分布到reduce中去,是我们的最终目标.由于Hash算法的局限性,按key Hash会或多或少的造成数据倾斜.大量经验表明数据倾斜的原因是人为的建表疏忽或业务逻辑可以规避的. 解决思路: Hive的执行是分阶段的,map处理数据量的差异取决于上一个stage的reduce输出,所以如何将数据均匀的分配到各个reduce中,就是解决数据倾斜的根本所在 具体办法: 内存优化和I/O优化: 驱动表:使用大表做驱动表,以防止内存溢出:Join最右边的表是驱动表:

Hive参数层面常用优化

1.hive数据仓库权限问题: set hive.warehouse.subdir.inherit.perms=true; 2.HiveServer2的内存 连接的个数越多压力越大,可以加大内存:可以通过-Xmx设置,在脚本中设置:-Xmx=2048m 甚至 -Xmx=4g 3.关闭推测式任务:默认是打开的 set hive.mapred.reduce.tasks.speculative.execution=false; set mapreduce.reduce.speculative=fals