Spark-shell 报错:Failed to get database default, returning NoSuchObjectException
Spark-shell 执行sql查询报错:
20/08/24 15:33:59 WARN metastore.ObjectStore: Failed to get database default, returning NoSuchObjectException
20/08/24 15:34:03 ERROR metastore.RetryingHMSHandler: AlreadyExistsException(message:Database default already exists)
在百度搜了很多解决方案,一点用没有,fq 找到了解决办法:
这个是因为没有在Spark配置hive的配置文件,把hive配置的hive-site.xml 文件拷贝到 spark 目录下即可
> mv hive/conf/hive-site.xml spark/conf/hive-site.xml
这样就解决了。
另外一个问题:
报错:
Caused by: java.lang.reflect.InvocationTargetException: org.datanucleus.exceptions.NucleusException: Attempt toinvoke the "BONECP" plugin to create a ConnectionPool gave an error : The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH. Please check your CLASSPATH specification, and the name of the driver.
这个问题从字面意思上很容易看到,是因为jdbc的driver连接不上,需要依赖 mysql-connector 的jar包。
mysql-connector 这个jar包在 hive 的lib 目录下,spark 存放jia包的路径是在 jars目录下,
所以执行:
mv hive/lib/mysql-connector-java-5.1.44-bin.jar spark/jars/mysql-connector-java-5.1.44-bin.jar
这样就可以了,然后再重启spark-shell,就可以正常查询hive里面的表了。
Spark-shell 报错:Failed to get database default, returning NoSuchObjectException的更多相关文章
- spark Failed to get database default, returning NoSuchObjectException
解决方法:1)Copy winutils.exe from here(https://github.com/steveloughran/winutils/tree/master/hadoop-2.6. ...
- springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedde
springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedde 创建 ...
- Vue.js报错Failed to resolve filter问题原因
Vue.js报错Failed to resolve filter问题原因 金刚 vue Vue.js js javascript 之前使用vue.js写分页功能时,写了一个过滤器,发现一个比较奇怪的错 ...
- nmap报错: Failed to open device ethxxx
nmap报错: Failed to open device ethxxx 周银辉 今天用nmap时, 报错: Failed to open device eth4, 好郁闷. 调查了一下, 是w ...
- Maven-008-Nexus 私服部署发布报错 Failed to deploy artifacts: Failed to transfer file: ... Return code is: 4XX, ReasonPhrase: ... 解决方案
我在部署构件至 maven nexus 私服时,有时会出现 Failed to deploy artifacts: Failed to transfer file: ... Return code i ...
- Eclipse启动 报错[Failed to load the JNI shared library jvm.dll
准备要做java服务器,在安装开发环境时,启动Eclipse报错[Failed to load the JNI shared library jvm.dll] 研究了下,造成错误的原因是由于eclip ...
- 备库搭建后,进入备库报错psql: FATAL: the database system is starting up
备库搭建后,进入备库报错psql: FATAL: the database system is starting up 原因:备库配置文件没有hot_standby = on mast ...
- hive日志位置(日志定位报错:Failed with exception Unable to move sourcehdfs://namenode/tmp/hive-pmp_bi/h)
Hive中的日志分为两种 1. 系统日志,记录了hive的运行情况,错误状况. 2. Job 日志,记录了Hive 中job的执行的历史过程. 日志查看方法 1,在本地运行机器上 hive日志存储位置 ...
- 使用laravel-admin后台sdk报错Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID、Provisional headers are shown
报错Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID请先确定自己的资源url是否可以确实访问到(地址正确与否.访问权限是否开启等) 若n ...
随机推荐
- 7-Pandas之索引调整方法
一.调整索引.修改列标签 1.调整索引的两种情况: 重新索引 设置新的索引 (1)重新索引 在Pandas对象中,其实索引也是一个对象,所以可对其进行修改. 例如:df.index=['a','b', ...
- PHP preg_split() 函数
preg_replace 函数通过一个正则表达式分隔字符串.高佣联盟 www.cgewang.com 语法 array preg_split ( string $pattern , string $s ...
- 省选模拟赛day4
怎么说?发现自己越来越菜了 到了不写题解写不出来题目的地步了.. 这次题目我都有认真思考 尽管思考的时候状态不太好 但是 我想 再多给我时间也思考不出来什么吧 所以写一份题解. T1 n个点的有根树 ...
- json-lib无法下载
maven无法下载json-lib 配置一下这个 <classifier>jdk15</classifier> 因为远程提供了两个
- javaWeb Maven Runner设置中文乱码
将Runner设置为 -DarchetypeCatal! 使maven在没有网络的情况下在本地查找下载好的插件 配置 -Dfile.encoding=gb2312 防止中文乱码
- 如何将ppt演示文稿上传到微信公众号?
如何将ppt演示文稿上传到微信公众号? 我们都知道创建一个微信公众号,在公众号中发布一些文章是非常简单的,但公众号添加附件下载的功能却被限制,如今可以使用小程序“微附件”进行在公众号中添加附件. 以下 ...
- Spring Cloud 之服务注册中心高可用
服务注册中心高可用 服务注册中心 eureka-server 高可用实施 版本 Spring Boot 版本 # Spring Boot 版本: <parent> <groupId& ...
- Spring Boot打包瘦身 Docker 使用全过程 动态配置、日志记录配置
springBoot打包的时候代码和jar包打包在同一个jar包里面,会导致jar包非常庞大,在不能连接内网的时候调试代码,每次只改动了java代码就需要把所有的jar包一起上传,导致传输文件浪费了很 ...
- adb-使用
1.打印日志 adb logcat -v time > logname.txt adb logcat -v > logname.txt 2.删除手机缓存日志 adb logcat -c 3 ...
- Consul服务治理发现学习记录
Consul 简介 Consul是一个服务网格(微服务间的 TCP/IP,负责服务之间的网络调用.限流.熔断和监控)解决方案,它是一个一个分布式的,高度可用的系统,而且开发使用都很简便.它提供了一个功 ...