schematool -initSchema -dbType mysql
Metastore connection URL: jdbc:mysql://localhost/metastore_db?createDatabaseIfNotExist=true
Metastore Connection Driver : com.mysql.jdbc.Driver
Metastore connection User: hiveuser
Starting metastore schema initialization to 2.1.0
Initialization script hive-schema-2.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 !!
Underlying cause: java.io.IOException : Schema script failed, errorcode 2
Use --verbose for detailed stacktrace.
*** schemaTool failed ***

以上错误查看mysql是否已经创建了metastore batabase, 如果创建,直接删除即可。

Error: Duplicate key name 'PCS_STATS_IDX' (state=42000,code=1061) ----Hive schematool -initSchema -dbType mysql的更多相关文章

  1. Error: Duplicate key name 'PCS_STATS_IDX' (state=42000,code=1061)

    以下异常说明mysql已经启动. 应先关掉先前启动的mysql.再执行初始化schema操作. $service mysql stop; # $HIVE_HOME/bin/schematool -db ...

  2. HIVE metastore Duplicate key name 'PCS_STATS_IDX' (state=42000,code=1061)

    HDP 版本:2.4.0.0-169. 解决:将hive 所在 节点上的/usr/hdp/2.4.0.0-169/hive/script/metastore/upgrade/msql/hive-sch ...

  3. Hive 报错 Error while compiling statement: FAILED: ParseException line 1:0 character '' not supported here (state=42000,code=40000)

    Hive报错 Error while compiling statement: FAILED: ParseException line 1:0 character '' not supported h ...

  4. Hive错误:Error: FUNCTION 'NUCLEUS_ASCII' already exists. (state=X0Y68,code=30000)

    问题 初始化derby失败: [root@bigdata111 apache-hive-2.3.0-bin]# schematool -dbType derby -initSchemaSLF4J: C ...

  5. ERROR: duplicate key value violates unique constraint "xxx"

    在postgresql中,由于为表的主键建立了自增序列,且数据是从正式库拷贝到正式库的,所以报错如下: (主要原因:自增序列中的当前序列号小于真实数据中的最大主键值,因此在新增数据时,会报唯一值的错误 ...

  6. shematool -initschema -dbtype mysql error org.apache.hadoop.hive.metastore.hivemetaexception:Failed to get schema version

    命令:schematool -initSchema -dbType mysql Fix the issue: edit /etc/mysql/my.cnf change bind-address   ...

  7. MyISAM引擎表出现“Error 'Incorrect key file for table”

    mysql主从复制中的从库突然出现了警报,sql_thread停止了,show slave status\G;查看 mysql> show slave status\G ; . row **** ...

  8. [JAVA][Liferay] Duplicate key value violates unique constraint for resourcepermissionid in Liferay

    Unexpected exception thrown when create new site: 09:47:10,114 ERROR [ajp-bio-8009-exec-113][JDBCExc ...

  9. mysql INSERT ... ON DUPLICATE KEY UPDATE语句

    网上关于INSERT ... ON DUPLICATE KEY UPDATE大多数文章都是同一篇文章转来转去,首先这个语法的目的是为了解决重复性,当数据库中存在某个记录时,执行这条语句会更新它,而不存 ...

随机推荐

  1. 在Ubuntu里安装Mysql5.7.23

    准备在Linux里安装Mysql,安装过程中遇到很多问题,这里记录下我成功安装的过程. 操作系统:Ubuntu 18.04 数据库:Mysql 5.7.23 安装步骤: 1.下载一个apt,下载mys ...

  2. ROS Learning-031 (提高篇-009 A Mobile Base-07) 控制移动平台 --- (操作)人机交互

    ROS 提高篇 之 A Mobile Base-07 - 控制移动平台 - (操作)人机交互 我使用的虚拟机软件:VMware Workstation 11 使用的Ubuntu系统:Ubuntu 14 ...

  3. 旋转矩阵(Rotate Matrix)的性质分析

    博客转载自:http://www.cnblogs.com/caster99/p/4703033.html 学过矩阵理论或者线性代数的肯定知道正交矩阵(orthogonal matrix)是一个非常好的 ...

  4. php学习笔记-多维数组

    多维数组就是有一个数组,它里面的每个元素又是一个数组. <?php $stuff =array('food'=>array('apple','orange'),'book'=>arr ...

  5. R: 控制流: if & for & while

    ################################################### 问题:if 判断   18.4.29 if 的应用与??...... 解决方案: # if(){ ...

  6. Entity Framework Code-First(20):Migration

    Migration in Code-First: Entity framework Code-First had different database initialization strategie ...

  7. (数组)Largest Rectangle in Histogram(栈解问题)

    Largest Rectangle in Histogram Given n non-negative integers representing the histogram's bar height ...

  8. java 包装类的应用

    package integer; public class baozhuang { public static void main(String[] args) { System.out.printl ...

  9. python--输出spwm的数组

    python的功能是非常强大的,这个例子使用python编写的输出spwm数组(不对,在C语言或者其他语言叫做数组,在这里叫做list.)的程序,我们在单片机程序里调用这个程序,可以达到输出spwm波 ...

  10. SQL:bat批处理多个.sql文件

    一.批处理文件 update.bat       设置sqlserver的实例     记得一定要配置logfile文件 @echo off :: #### B. #### set LOGFILE=& ...