gpt4 book ai didi

hadoop - 如何在hive-site.xml中映射Hive仓库路径?

转载 作者:行者123 更新时间:2023-12-02 20:34:59 24 4
gpt4 key购买 nike

我是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存储元数据。请说明必要的更改(如果有)。

提前致谢!!!
**

最佳答案

This command are used to store metadata



不完全的。那就是HDFS上的Hive Warehouse目录。这是原始数据而不是元数据存在的地方-完全在Mysql中。

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

But I can't find those in filesystem.



可能因为这些是HDFS路径,而不是放置在本地文件系统上

what is the meaning of this commands?



创建默认的仓库目录和临时暂存目录,以存储Hive进程要使用的数据

关于hadoop - 如何在hive-site.xml中映射Hive仓库路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51508694/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com