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 ...
随机推荐
- 11-19 hashlib模块
Python的hashlib提供了常见的摘要算法,如MD5,SHA1等等. 什么是摘要算法呢? 摘要算法又称哈希算法.散列算法.它通过一个函数,把任意长度的数据转换为一个长度固定的数据串(通常用16进 ...
- PHP gmstrftime() 函数
------------恢复内容开始------------ 实例 根据区域设置格式化 GMT/UTC 日期和时间: <?phpecho(gmstrftime("%B %d %Y, % ...
- JDBC(1)-数据库连接和CRUD操作
关于jdbc的全部jar包 链接:https://pan.baidu.com/s/1peofgu89SpepTTYuZuphNw 提取码:vd5v 一.获取数据库连接 1. Driver接口介绍 ja ...
- Blob分析之board.hdev
* board.hdev: Detection of missing solder* 获取当前系统参数get_system ('clip_region', Information)*设置当前系统参数s ...
- TearmQuery()
lucene 中的 TearmQuery() 在.search( tearmQuery, q)查询时 比较矫情 q只能是小写
- 【BZOJ1426】收集邮票 题解 (期望)
题目:有n种不同的邮票,皮皮想收集所有种类的邮票.唯一的收集方法是到同学凡凡那里购买,每次只能买一张,并且买到的邮票究竟是n种邮票中的哪一种是等概率的,概率均为1/n.但是由于凡凡也很喜欢邮票,所以皮 ...
- Redis服务之高可用组件sentinel
前文我们了解了redis的常用数据类型相关命令的使用和说明,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/13419690.html:今天我们来聊一下redis ...
- 《计算机存储与外设》 1Cache存储器与虚拟存储器
初读这本书,是2020年3,4月吧,以前学的大多数处理器,balabala的,虽然也有介绍储存器的,但总是不是很详细,主要还是关注cpu等计算部件或者总线等事物,就如同这本书中所写,人们往往可以很清楚 ...
- Chrome-AdGuard 无与伦比的广告拦截扩展
一款无与伦比的广告拦截扩展,对抗各式广告与弹窗. AdGuard 广告拦截器可有效的拦截所有网页上的所有类型的广告,甚至是在 Facebook.Youtube 以及其他万千网站上的广告! AdGuar ...
- 记不住git命令?试试这个命令浏览网站
Find the right git commands without digging through the web. 找 git 命令,无需谷歌百度,无需 git -help,这个网站以图形界面的 ...