spark 2.4

 

spark sql中执行

set hive.exec.max.dynamic.partitions=10000;

后再执行sql依然会报错:

org.apache.hadoop.hive.ql.metadata.HiveException:
Number of dynamic partitions created is 1001, which is more than 1000.
To solve this try to set hive.exec.max.dynamic.partitions to at least 1001.

这个参数hive.exec.max.dynamic.partitions的默认值是1000,修改没有生效,

 

原因如下:

`HiveClient` does not know new value 1001. There is no way to change the default value of `hive.exec.max.dynamic.partitions` of `HiveCilent` with `SET` command.

The root cause is that `hive` parameters are passed to `HiveClient` on creating. So, the workaround is to use `--hiveconf` when starting `spark-shell`.

 

解决方法是在启动spark-sql时设置hiveconf

spark-sql --hiveconf hive.exec.max.dynamic.partitions=10000

 

参考:

https://issues.apache.org/jira/browse/SPARK-19881

相关文章:

  • 2022-01-05
  • 2022-02-06
  • 2022-01-07
  • 2021-07-15
  • 2021-09-26
  • 2021-07-18
  • 2021-10-12
  • 2021-12-28
猜你喜欢
  • 2022-02-21
  • 2021-10-17
  • 2021-06-06
  • 2021-09-01
  • 2021-07-09
  • 2022-02-28
  • 2021-05-22
相关资源
相似解决方案