首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >蜂巢继续使用德比而不是mysql

蜂巢继续使用德比而不是mysql
EN

Stack Overflow用户
提问于 2022-03-30 02:36:01
回答 1查看 355关注 0票数 0

我刚开始使用Hive,我遇到了问题,因为一开始我使用了derby,现在我想使用mysql,但是当我检查错误日志时,它仍然击中了derby --如何从derby切换到mysql?谢谢

我运行这个schematool -dbType mysql -initSchema --verbose

但最终却拥有了这个

代码语言:javascript
复制
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/Cellar/hive/3.1.2_3/libexec/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.30.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:derby:;databaseName=metastore_db;create=true
Metastore Connection Driver :    org.apache.derby.jdbc.EmbeddedDriver
Metastore connection User:   APP
Starting metastore schema initialization to 3.1.0
Initialization script hive-schema-3.1.0.mysql.sql
Connecting to jdbc:derby:;databaseName=metastore_db;create=true
Connected to: Apache Derby (version 10.14.1.0 - (1808820))
Driver: Apache Derby Embedded JDBC Driver (version 10.14.1.0 - (1808820))
Transaction isolation: TRANSACTION_READ_COMMITTED
0: jdbc:derby:> !autocommit on
Autocommit status: true
0: jdbc:derby:> /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */
Error: Syntax error: Encountered "<EOF>" at line 1, column 64. (state=42X01,code=30000)
Closing: 0: jdbc:derby:;databaseName=metastore_db;create=true
org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent

我已经更改了hivesite.xml,但是它仍然是一样的。

代码语言:javascript
复制
   <property>
      <name>javax.jdo.option.ConnectionURL</name>
      <value>jdbc:mysql://127.0.0.01:3306/metastore?createDatabaseIfNotExist=true&useSSL=false</value>
      <description>metadata is stored in a MySQL server</description>
   </property>

非常感谢你的帮助

EN

回答 1

Stack Overflow用户

发布于 2022-04-01 20:31:21

有三种运行蜂窝元存储的方式:

  1. 嵌入式Metastore
  2. 局部Metastore
  3. 远动区

嵌入式Metastore总是与嵌入式德比数据库一起运行。

如果希望使用MySQL运行,则需要使用本地元存储模式或远程元存储模式(有关每种模式的更多详细信息,请参阅此处。)。

还要注意,您还必须在hivesite.xml中设置正确的JDBC驱动程序。

代码语言:javascript
复制
 <property>
    <name>javax.jdo.option.ConnectionDriverName</name>
    <value>com.mysql.jdbc.Driver</value>
</property>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71670863

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档