我在我的 Apache Hadoop 分布式集群中添加了 Hive。而不是在本地目录中创建元存储,我想在 HDFS 中创建元存储。但是,我在 hive-site.xml 中的设置似乎不起作用。我收到如下错误,似乎 hive 仍然尝试在本地模式下使用 run metastore。
java.sql.SQLException:无法创建目录 /home/zz/metastore_db。
谁能告诉我我的设置出了什么问题?非常感谢!
以下是我的 hive-site.xml 内容:
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://client2/metastore</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<description>MySQL JDBC driver class</description>
</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/user/hive/warehouse</value>
<description>location of default database for the warehouse</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hive</value>
<description>user name for connecting to mysql server </description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>hadoop</value>
</property>
<property>
<name>hive.metastore.schema.verification</name>
<value>false</value>
</property>
<property>
<name>hive.server2.servermode</name>
<value>thrift</value>
</property>
<property>
<name>datanucleus.autoCreateSchema</name>
<value>false</value>
</property>
<property>
<name>datanucleus.fixedDatastore</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>master1</value>
</property>
<property>
<name>hive.metastore.uris</name>
<value>thrift://client2:9083</value>
<description>IP address (or fully-qualified domain name) and port of the metastore host</description>
</property>