首页 > 解决方案 > 安装 hive 类路径包含多个 SLF4J 绑定

问题描述

我正在尝试按照本教程在 ubuntu 20.04 上安装 hive,但是在启动 $HIVE_HOME/bin/schematool –initSchema –dbType derby 时它会给我以下错误

SLF4J: Found binding in [jar:file:/home/hadoop/apache-hive-3.1.2-bin/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.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]
HiveSchemaTool:Parsing failed.  Reason: Missing required option: [-help print this message, -alterCatalog Alter a catalog, requires --catalogLocation and/or --catalogDescription parameter as well, -initSchemaTo Schema initialization to a version, -upgradeSchemaFrom Schema upgrade from a version, -moveDatabase Move a database between catalogs.  Argument is the database name. Requires --fromCatalog and --toCatalog parameters as well, -moveTable Move a table to a different database.  Argument is the table name. Requires --fromCatalog, --toCatalog, --fromDatabase, and --toDatabase  parameters as well., -initSchema Schema initialization, -createCatalog Create a catalog, requires --catalogLocation parameter as well, -upgradeSchema Schema upgrade, -info Show config and schema details, -validate Validate the database]
usage: schemaTool
 -alterCatalog <arg>                Alter a catalog, requires
                                    --catalogLocation and/or
                                    --catalogDescription parameter as well
 -catalogDescription <arg>          Description of new catalog
 -catalogLocation <arg>             Location of new catalog, required when
                                    adding a catalog
 -createCatalog <arg>               Create a catalog, requires
                                    --catalogLocation parameter as well
 -dbOpts <databaseOpts>             Backend DB specific options
 -dbType <databaseType>             Metastore database type
 -driver <driver>                   driver name for connection
 -dryRun                            list SQL scripts (no execute)
 -fromCatalog <arg>                 Catalog a moving database or table is
                                    coming from.  This is required if you
                                    are moving a database or table.
 -fromDatabase <arg>                Database a moving table is coming
                                    from.  This is required if you are
     

任何想法 ?

标签: hive

解决方案


我只是颠倒了参数,它起作用了 schematool -dbType derby -initSchema


推荐阅读