我成功地使用默认数据库在hadoop上运行了hive。现在我想通过mysql连接hive(mysql安装在端口3306上)。
步骤:1)创建hive-site.xml并粘贴属性
<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) 将连接器粘贴到配置单元库文件夹中。
3) 而不是使用mysql检查,但没有在hivewarehouse中创建数据库。
我没有错误,但仍然没有创建数据库。请建议如果有任何解决方案。
编辑
日志文件出错
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.
1条答案
按热度按时间brccelvz1#
hive有一个限制:
下面使用的数据库“hive”仅用于在mysql dbms中存储hive元数据信息
这并不意味着hive将在hdfs中为数据仓库使用相同的名称。限制是hive只支持名称'default'作为db名称。
用于配置单元的jdbc连接字符串(这应该让您有点清楚)
检查10000/默认零件并比较(1)和(2)
我不确定这是否已经改变了。