您的位置:首页 > 其它

Error: Duplicate key name 'PCS_STATS_IDX' (state=42000,code=1061) ----Hive schematool -initSchema

2018-02-07 11:53 513 查看
当我们输入./schematool -initSchema -dbType mysql的时候,会出现以下错误

Metastore connection URL: jdbc:mysql://192.168.*./hive?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是否已经创建了hive这个表, 如果创建,你想从新安装的话,把那个你创建的表删了即可。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐