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

标签 hadoop hive

我是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/

相关文章:

hadoop - 色相500服务器错误

hadoop - 即使删除了数据库,Hive CLI 也会显示数据库使用情况

hadoop - 线程 "main"java.lang.NoClassDefFoundError : org/apache/hadoop/util/Tool 中的异常

hadoop - 获取配置单元脚本的 _SUCCESS 文件

input - 节点本地映射减少作业

hadoop - 使用 globStatus 和 Google Cloud Storage 存储桶作为输入时无法运行 Spark 作业

arrays - 如何在 HIVE 中合并具有不同模式的表?

java - Spark 2.0.0 抛出 AlreadyExistsException(消息 :Database default already exists) when interact with Hive 1. 0.0

hadoop - 无法将数据以正确的格式加载到配置单元表中

hadoop - 缺少 Windows 10 的 hadoop 安装