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


    以下异常说明mysql已经启动。 应先关掉先前启动的mysql.再执行初始化schema操作。

    $service mysql stop;

    # $HIVE_HOME/bin/schematool -dbType mysql -initSchema
    which: no hbase in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:/usr/local/src/jdk1.8.0_112/bin:/usr/local/src/hadoop-2.7.3/bin:/usr/local/src/apache-hive-2.1.1-bin/bin:/home/pl62716/spark-2.1.0-bin-hadoop2.6/bin:/home/pl62716/apache-maven-3.3.9/bin://home/pl62716/sbt-launcher-packaging-0.13.13/bin:/root/bin)
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/usr/local/src/apache-hive-2.1.1-bin/lib/hive-jdbc-2.1.1-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/usr/local/src/apache-hive-2.1.1-bin/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/usr/local/src/hadoop-2.7.3/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
    SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
    Metastore connection URL: jdbc:mysql://sd-9c1f-2eac:3306/hive?createDatabaseIfNotExist=true
    Metastore Connection Driver : com.mysql.jdbc.Driver
    Metastore connection User: hive
    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 ***

  • 相关阅读:
    变参宏 __VA_ARGS__
    预处理中的 # 和 ##
    strlen与sizeof异同
    .vimrc
    sudo:有效用户 ID 不是 0,sudo 属于 root 并设置了 setuid 位吗
    远程ssh登陆时报错:/bin/bash: Permission denied
    Excel中VBA进行插入列、格式化、排序
    ORACLE发送带附件邮件的二三事之一
    Windows Server 2008 双网卡同时上内外网 不能正常使用
    VMWARE修改CPUID
  • 原文地址:https://www.cnblogs.com/liupuLearning/p/6802689.html
Copyright © 2020-2023  润新知