项目场景:
idea中搭建spark环境报错:Unable to fetch table student. Invalid method name: 'get_table_req';
问题描述
Unable to fetch table student. Invalid method name: 'get_table_req';
.......
原因分析:
hive和spark之间版本不兼容的问题
解决方案:
更改spark环境等依赖,匹配自己虚拟机或者本地的hive
我的hadoop版本为2.7.1 hive版本是2.1.1
相匹配的spark是2.4.0
<dependencies> <dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-sql_2.11</artifactId> <version>2.4.0</version> </dependency> <dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-hive_2.11</artifactId> <version>2.4.0</versio