簡體   English   中英

如何在hive-site.xml中映射Hive倉庫路徑?

[英]How to map hive warehouse path in hive-site.xml?

我是ubuntu的新手,我正在嘗試在系統上安裝hive 3.0.0。 我正在關注互聯網上的教程,並且遇到了此命令。

hdfs dfs -mkdir -p /user/hive/warehouse
hdfs dfs -mkdir /tmp

此命令用於存儲元數據。 但是我在文件系統中找不到這些。

所以我的問題是,該命令的含義是什么? 以及如何在hive-site.xml上映射該元數據?

以下是我的教程中的hive-site.xml。

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="confguration.xsl"?><!--
Licensed to the Apache Software Foundation (ASF) under one or more
contri utor license agreements. See the NOTICE fle distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this fle to You under the Apache License, Version 2.0
(the "License"); you may not use this fle except in compliance with
the License. You may o tain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required y applicable law or agreed to in writing, software-->




<confguration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost/metastore?createDatabaseIfNotExist=true</value>
<description>
JDBC connect string for a JDBC metastore.
To use SSL to encrypt/authenticate the connection, provide database-specifc SSL fag in
the connection URL.
For example, jdbc:postgresql://myhost/d ?ssl=true for postgres database.
</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>

<value>com.mysql.jdbc.Driver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hiveuser</value>
<description>Username to use against metastore database</description>
</property>

<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>password@123</value>
<description>password to use against metastore database</description>
</property>
<property>
<name>datanucleus.autoCreateSchema</name>
<value>true</value>
</property>
<property>
<name>datanucleus.fxedDatastore</name>


<value>true</value>
</property>
<property>
<name>datanucleus.autoCreateTables</name>
<value>True</value>
</property>
</confguration>

**我正在使用mysql存儲元數據。 請說明必要的更改(如果有)。

提前致謝!!! **

此命令用於存儲元數據

不完全的。 那就是HDFS上的Hive Warehouse目錄。 這是原始數據而不是元數據存在的地方-完全在Mysql中。

HDFS由Hive所需的Hadoop客戶端庫的core-site.xml配置,而不是由hive-site.xml文件配置

但是我在文件系統中找不到這些。

可能因為這些是HDFS路徑,而不是放置在本地文件系統上

該命令的含義是什么?

創建默認的倉庫目錄和臨時暫存目錄,以存儲Hive進程要使用的數據

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM