美文网首页
Ambari Spark 集成 Hive

Ambari Spark 集成 Hive

作者: liuzx32 | 来源:发表于2020-06-10 11:27 被阅读0次
  1. beeline出现org.apache.thrift.TApplicationException: Required field ‘client_protocol’ is unset! Struct:TOpenSessionReq(client_protocol:null,configuration:set:hiveconf:hive.server2.thrift.resultset.default.fetch.size=1000,use:database=default})
需要将hive/bin 下的 beeline 替换为 spark/bin 下的 beeline

2、新版本spark不使用hive的源数据表的问题

在Hive配置中对spark2-hive-site-override做修改

需要将metastore.catalog.default=spark修改为metastore.catalog.default=hive

3、出现AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Table default.partition_test failed strict managed table checks due to the following reason: Table is marked as a managed table but is not transactional.)

对hive-site.xml做修改

需要将hive.strict.managed.tables=true替换为hive.strict.managed.tables=false
#注意此处是hive中的配置信息

4、出现org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: Load Data failed for hdfs://:8020/warehouse/tablespace/managed/hive//.hive-staging_hive_2019-07-02_18-17-08_028_419193115114639265-1/-ext-10000/part-00000-1f0e8f19-6a12-448f-ba18-a2319711c0aa-c000 as the file is not owned by hive and load data is also not ran as hive;

需要在spark hive-site.xml添加hive.load.data.owner=spark (具体的执行用户)

5、出现org.apache.spark.sql.AnalysisException: java.lang.NullPointerException: null;at org.apache.spark.sql.hive.HiveExternalCatalog.withClient(HiveExternalCatalog.scala:106)

其中的SparkSQL不支持hive的OrcInputFormat格式

相关文章

网友评论

      本文标题:Ambari Spark 集成 Hive

      本文链接:https://www.haomeiwen.com/subject/dkvutktx.html