我是新手。我想知道hive-site.xml
版本中的hive-default.xml
和hive-0.13.1
个文件位置。
我已从以下位置下载了hive0.13.1-bin
版本。
http://apache.mirrors.pair.com/hive/hive-0.13.1/
提取并配置hive环境变量。
我可以运行命令(create table, show, load data, query table..)
。
但在conf(/hive/hive-0.13-1/conf)
目录中,我没有看到hive-site.xml
和hive-default.xml
个文件。
这些文件位于hive-0.13.1
版本?
答案 0 :(得分:7)
按照步骤
1)提取文件夹
2)转到/apache-hive-0.13.1-bin/conf并制作hive-default.xml.template的副本,它看起来像hive-default.xml(copy).template。
3)将hive-default.xml(copy).template重命名为hive-site.xml。
4)将hive-env.sh.template复制到hive-env.sh。
添加hive-env.sh
export HADOOP_HEAPSIZE=1024
# Set HADOOP_HOME to point to a specific hadoop install directory
export HADOOP_HOME=/home/user17/BigData/hadoop
#hive
export HIVE_HOME=/home/user17/BigData/hive
# Hive Configuration Directory can be controlled by:
export HIVE_CONF_DIR=$HIVE_HOME/conf
5)在.bashrc文件中输出hadoop和hive路径
export HADOOP_HOME=/home/user17/BigData/hadoop
export PATH=$PATH:$HADOOP_HOME/bin
export HIVE_HOME=/home/user17/BigData/hive
export PATH=$PATH:$HIVE_HOME/bin
通过
开始你的hadoopstart-all.sh
享受您的蜂巢。根据您的系统,在导出命令中给出hadoop和hive路径。我知道如果不能正常工作。
答案 1 :(得分:5)
您无法在conf目录中找到hive-site.xml
文件。
你应该成功。 hive-site.xml
看起来像这样:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<configuration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost/metastore?createDatabaseIfNotExist=true</value>
<description>the URL of the MySQL database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>root</value>
</property>
<property>
<name>hive.hwi.listen.host</name>
<value>0.0.0.0</value>
</property>
<property>
<name>hive.hwi.listen.port</name>
<value>9999</value>
</property>
<property>
<name>hive.hwi.war.file</name>
<value>lib/hive-hwi-0.12.0.war</value>
</property>
<!--
<property>
<name>hive.metastore.local</name>
<value>true</value>
</property>
-->
</configuration>
在mysql中搜索hive元数据的一些概念。