我刚开始使用ubuntu,我正在尝试在我的系统上安装hive 3.0.0。我正在网上学习一个教程,我偶然发现了这个命令。
hdfs dfs -mkdir -p /user/hive/warehouse
hdfs dfs -mkdir /tmp此命令用于存储元数据。但我在文件系统中找不到。
,所以我的问题是,这个命令的意义是什么?以及如何将元数据映射到hivesite.xml上?
下面是我的教程中的hivesite.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存储元数据。如有必要更改,请解释。
提前谢谢!**
发布于 2018-07-25 05:37:07
此命令用于存储元数据。
不完全是。这是HDFS上的目录。这是原始数据存在的地方,而不是元数据--它完全在Mysql中。
HDFS由Hive所需Hadoop客户端库的核心site.xml配置,而不是hive-site.xml文件。
但我在文件系统中找不到。
可能是因为这些是HDFS路径,而不是本地文件系统上的位置。
这条命令的意思是什么?
要创建默认的仓库和临时划痕目录,需要存储要由Hive进程使用的数据。
https://stackoverflow.com/questions/51508694
复制相似问题