message:hive.metastore.sasl.enabled can’t be false in non-testing mode

spark-shell  执行下列语句报错

import org.apache.spark.sql.{SaveMode, SparkSession}
val df=spark.table("xy_app_hive.member_rule_w_incr_v2")
df.write.mode(SaveMode.Overwrite).saveAsTable("xy_wulichuang.test1")

Caused by: org.apache.hadoop.hive.metastore.api.MetaException: hive.metastore.sasl.enabled can't be false in non-testing mode
   at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$create_table_with_environment_context_result$create_table_with_environment_context_resultStandardScheme.read(ThriftHiveMetastore.java:41649)

解决方法:

sentry.hive.testing.mode

ture

image

您可以选择一种方式赞助本站