hive设置

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/clever_wr/article/details/88975098

hive设置:

1.是否开启动态分区功能默认是false,如果是开启就使用true。

set hive.exec.dynamic.partition = false

2.动态分区模式,默认strict,表示必须指定至少一个分区为静态分区,nonstrict模式表示允许所有分区字段都可以使用动态分区。

set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nonstrict;

3.在所有执行MR的节点上,最大一共可以创建多少个动态分区。

set hive.exec.max.dynamic.partitions = 1000

4.整个MR Job中,最大可以创建多少个HDFS文件。一般默认值足够了,除非你的数据量非常大,需要创建的文件数大于100000,可根据实际情况加以调整。

set hive.exec.max.created.files=100000

5.当有空分区生成时,是否抛出异常。一般不需要设置。

set hive.error.on.empty.partition=false

猜你喜欢

转载自blog.csdn.net/clever_wr/article/details/88975098