在本地模式下配置配置单元

t40tm48m  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(500)

我正在尝试在本地模式配置中设置hive-0.9.0。在/conf中,我创建了hive-site.xml并指定了仓库文件夹的属性。但我认为hive没有使用我定义的位置,因为它没有在该位置创建“仓库”文件夹。
另外,有必要让hadoop cluster在本地模式配置单元中运行,因为当我在不启动hadoop cluster的情况下发出任何ddl命令时,它会抛出错误。

FAILED: Error in metadata: MetaException(message:Got exception: java.net.ConnectException Call to localhost/127.0.0.1:54310 failed on connection exception: java.net.ConnectException: Connection refused)

hive-site.xml的内容如下:

<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>

<property>

<name>hive.metastore.warehouse.dir</name>

<value>/home/hadoopuser/hive/warehouse</value>

<description>

Local or HDFS directory where Hive keeps table contents.

</description>

</property>

<property>

<name>hive.metastore.local</name>

<value>true</value>

<description>

Use false if a production metastore server is used.

</description>

</property>

<property>

<name>javax.jdo.option.ConnectionURL</name>

<value>jdbc:derby:;databaseName=/home/hadoopuser/hive/metastore_db;create=true</value>

<description>

The JDBC connection URL.

</description>

</property>

</configuration>
wlwcrazw

wlwcrazw1#

配置单元查询在内部运行mapreduce。所以hadoop必须在您尝试查询hive时启动。

相关问题