[英]hive using mysql metastore
我使用默認數據庫在hadoop上成功運行配置單元 。現在我想通過mysql連接Hive(在端口3306上安裝mysql)。
步驟: 1)創建hive-site.xml和paste屬性
<property>
<name>hive.metastore.local</name>
<value>true</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hadoop</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>hadoop</value>
</property>
2)在hive lib文件夾中粘貼連接器。
3)比使用我的mysql檢查但沒有在hive倉庫中創建的數據庫。
我沒有錯誤,但仍然沒有創建數據庫。請建議是否有任何解決方案。
編輯
日志文件出錯
ERROR DataNucleus.Plugin (Log4JLogger.java:error(115)) - Bundle "org.eclipse.jdt.core" requires "org.eclipse.core.resources" but it cannot be resolved.
ERROR DataNucleus.Plugin (Log4JLogger.java:error(115)) - Bundle "org.eclipse.jdt.core" requires "org.eclipse.core.resources" but it cannot be resolved.
ERROR DataNucleus.Plugin (Log4JLogger.java:error(115)) - Bundle "org.eclipse.jdt.core" requires "org.eclipse.core.runtime" but it cannot be resolved.
ERROR DataNucleus.Plugin (Log4JLogger.java:error(115)) - Bundle "org.eclipse.jdt.core" requires "org.eclipse.core.runtime" but it cannot be resolved.
ERROR DataNucleus.Plugin (Log4JLogger.java:error(115)) - Bundle "org.eclipse.jdt.core" requires "org.eclipse.text" but it cannot be resolved.
ERROR DataNucleus.Plugin (Log4JLogger.java:error(115)) - Bundle "org.eclipse.jdt.core" requires "org.eclipse.text" but it cannot be resolved.
Hive有一個限制:
您在下面使用的數據庫'hive'僅用於在mysql dbms中存儲Hive元數據信息
1. jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true
這並不意味着Hive將在HDFS中為數據倉庫使用相同的名稱。 限制是Hive僅支持名稱“default”作為db名稱。
Hive的JDBC連接字符串(這應該讓你有點清楚)
2. jdbc:hive://localhost:10000/default
檢查10000 /默認部分並比較(1)和(2)
我不確定這是否已經改變了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.