hive安装 初始化报错Error: Duplicate key name ‘PCS_STATS_IDX‘ (state=42000,code=1061)
错误日志
[root@mihaoyu151 conf]# schematool -dbType mysql -initSchema
which: no hbase in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/opt/soft/jdk180/bin:/opt/soft/zookeeper345/bin:/opt/soft/hadoop260/sbin:/opt/soft/hadoop260/bin:/opt/soft/jdk180/bin:/opt/soft/hadoop260/sbin:/opt/soft/hadoop260/bin:/opt/soft/zookeeper345/bin:/opt/soft/hive110/bin)
21/11/09 14:25:20 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
21/11/09 14:25:20 WARN conf.HiveConf: HiveConf of name hive.server2.thrift.client.user does not exist
21/11/09 14:25:20 WARN conf.HiveConf: HiveConf of name hive.server2.thrift.client.password does not exist
Metastore connection URL: jdbc:mysql://192.168.133.151:3306/hive151?createDatabaseIfNotExist=true
Metastore Connection Driver : com.mysql.jdbc.Driver
Metastore connection User: root
Starting metastore schema initialization to 1.1.0-cdh5.14.2
Initialization script hive-schema-1.1.0.mysql.sql
Error: Duplicate key name 'PCS_STATS_IDX' (state=42000,code=1061)
org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!
*** schemaTool failed ***
报错原因
mysql中已有hive数据库
解决办法
删除mysql中hive数据库
[root@mihaoyu151 soft]# mysql -uroot -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 135
Server version: 5.7.36 MySQL Community Server (GPL)Copyright (c) 2000, 2021, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| hive151 |
| mysql |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.00 sec)mysql> drop database hive151;
Query OK, 54 rows affected (0.13 sec)mysql> exit;
Bye[root@mihaoyu151 soft]# schematool -dbType mysql -initSchema
which: no hbase in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/opt/soft/jdk180/bin:/opt/soft/zookeeper345/bin:/opt/soft/hadoop260/sbin:/opt/soft/hadoop260/bin:/opt/soft/jdk180/bin:/opt/soft/hadoop260/sbin:/opt/soft/hadoop260/bin:/opt/soft/zookeeper345/bin:/opt/soft/hive110/bin)
21/11/09 14:30:24 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
21/11/09 14:30:24 WARN conf.HiveConf: HiveConf of name hive.server2.thrift.client.user does not exist
21/11/09 14:30:24 WARN conf.HiveConf: HiveConf of name hive.server2.thrift.client.password does not exist
Metastore connection URL: jdbc:mysql://192.168.133.151:3306/hive151?createDatabaseIfNotExist=true
Metastore Connection Driver : com.mysql.jdbc.Driver
Metastore connection User: root
Starting metastore schema initialization to 1.1.0-cdh5.14.2
Initialization script hive-schema-1.1.0.mysql.sql
Initialization script completed
schemaTool completed
hive安装 初始化报错Error: Duplicate key name ‘PCS_STATS_IDX‘ (state=42000,code=1061)相关推荐
- Error: Duplicate key name ‘PCS_STATS_IDX‘ (state=42000,code=1061)
Hive初始化schematool -dbType mysql -initSchema报错: # Initialization script hive-schema-2.3.0.mysql.sql E ...
- mysql 1061 duplicate key name_Error: Duplicate key name 'PCS_STATS_IDX' (state=42000,code=1061)
以下异常说明mysql已经启动. 应先关掉先前启动的mysql.再执行初始化schema操作. $service mysql stop; # $HIVE_HOME/bin/schematool -db ...
- Linux-Mysql 源码包安装初始化报错
初始化报错信息 [ERROR] --initialize specified but the data directory has files in it. Aborting. 一.报错原因时因为已经 ...
- Mac用Pycharm安装mediapipe报错ERROR: Could not find a version that satisfies the requirement mediapipe
问题 因为最近要用python做一个手部检测的项目,于是用找了个开源的程序跑了跑,发现安装mediapipe的时候会报错 ERROR: Could not find a version that sa ...
- 安装rabbitMq报错:error: unpacking of archive failed on file /usr/lib/rabbitmq/lib/rabbitmq_server-3.8.9
安装rabbitMq报错: 错误提示:error: unpagacking of archive failed on file /usr/lib/rabbitmq/lib/rabbitmq_serve ...
- 在Linux中安装MySQL报错“error: Failed dependencies: mysql-community-libs(x86-32) >= 5.7.9 is needed by my“
异常 在Linux中安装MySQL报错: 原因 因为缺少相关的依赖,所以要先安装这些依赖才能安装MySQL成功. 解决 (注意:这种方法是错误的,安装后并不能启动MySQL成功) 在每个安装指令后面添 ...
- django2.0 在安装mysqlclient 报错ERROR: Command errored out with exit status 1: python setup.py egg_info
环境:centos7 + Django2.0 + python3.6 django2.0连接mysql需要安装PyMySQL和mysqlclient pip3 install PyMySQL pip ...
- 安装kerberos报错 error: command 'gcc' failed with exit status 1
pip install kerberos 报错:error: command 'gcc' failed with exit status 1 安装环境工具 yum install gcc libffi ...
- R语言switch语句报错Error: duplicate ‘switch‘ defaults
解决方法 对于数值型: print(switch(3,"h1","h2","h3","h4")) # 打印 h3 pri ...
最新文章
- Shell中常用的引号
- 30分钟git命令入门到放弃
- Linux下面 多线程死锁问题的调试
- 计算机图形学真实感显示代码,计算机图形学实验 - 真实感图形场景的生成
- java密码学原型算法_java密码学原型算法实现——双线性对.pdf
- 美图赏析:拆解USB无线网卡,电路方案非常经典
- 网络-HTTP请求跨域访问控制
- int输出%f浮点值是0,double/float 浮点数%d输出0的原因
- Redis数据库 | 快速入门 | 自学笔记
- c++ public protected private 继承
- Python基于OpenCV实现视频数据切割为图像数据
- 川大计算机复试公平吗,看清华、川大这波操作,你还会担心网络复试会不公平吗?...
- Padavan路由器无法启用FRP的解决方法(固件版本3.4.3.9-099_11-23)
- 2019年互联网企业软件测试面试题(常考)
- odin学习3之numbers
- 落实安全生产责任,施工单位双重预防体系智能化管理解决方案
- PLC可编程控制器、单片机开发应用及电气控制综合实训装置
- Linux命令之top命令
- IBM服务器微软集群安装
- Python编程:判断字符串中是否包含中文
热门文章
- 输出1000-2000年中的闰年
- LinkedSee灵犀朱品燕:开启AIOps新时代
- 三个学生四门课程,求出学生平均成绩和课程的平均成绩;n个学生每人m门课程,找出最高分学生,输出有一门成绩不合格的学生的各门成绩,计算每门成绩都在85分及以上的学生的人数(C)
- 如何查询网站收录?如何自动查询网站收录更新并保存?
- MacOS 安装Hadoop3.1.1教程
- Phoenix 介绍和基本用法
- 本地html运行网址,如何在本地运行的网页上创建指向本地文件的链接?
- 永磁同步电机的一些资料汇总
- 西门子S7-200 SMART(6ES7 288-1ST40-0AA0)相关与晨控智能CK-FR08-E00关于modbus tcp 通信配置指南
- STC12C5A60S2驱动DHT11温湿度模块传感器