Spark Sql读取hive表-Unsupported data source type for direct query on files:hive;;
spark sql在读取hive表时,配置、spark与hive版本、等等很多因素可能会导致操作失败,本随笔就以下异常记录排查方案。
集群环境:HDP3
组件版本:spark2.3.0、hive3.0.0.3.0
ERROR yarn.ApplicationMaster:user class threw exception:org.apache.spark.sql.AnalysisException:Unsupported data source type for direct query on files:hive;;
org.apache.spark.sql.AnalysisException:Unsupported data source type for direct query on files:hive;;
1.hive-site.xml是否提交
hive-site.xml决定spark-sql连接hive时关键配置
2.操作的hive表是否存在
如操作的hive表不存在,使用spark-sql读取时也会出现该异常