首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在hivesite.xml中映射蜂窝仓库路径?

问如何在hivesite.xml中映射蜂窝仓库路径?
EN

Stack Overflow用户
提问于 2018-07-24 23:01:41
回答 1查看 474关注 0票数 0

我刚开始使用ubuntu,我正在尝试在我的系统上安装hive 3.0.0。我正在网上学习一个教程,我偶然发现了这个命令。

代码语言:javascript
复制
hdfs dfs -mkdir -p /user/hive/warehouse
hdfs dfs -mkdir /tmp

此命令用于存储元数据。但我在文件系统中找不到。

,所以我的问题是,这个命令的意义是什么?以及如何将元数据映射到hivesite.xml上?

下面是我的教程中的hivesite.xml。

代码语言:javascript
复制
<?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存储元数据。如有必要更改,请解释。

提前谢谢!**

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-07-25 05:37:07

此命令用于存储元数据。

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

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

但我在文件系统中找不到。

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

这条命令的意思是什么?

要创建默认的仓库和临时划痕目录,需要存储要由Hive进程使用的数据。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51508694

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档