2014-12-01 35 views
5

我是新手。我想知道在hive-0.13.1版本中的hive-site.xmlhive-default.xml文件位置。hive0.13.1中的hive-site.xml路徑

我已經從下面的位置下載了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.xmlhive-default.xml文件。

這些文件位於hive-0.13.1版本中的位置?

回答

7

按照步驟

1)解壓文件夾

2)去/apache-hive-0.13.1-bin/conf,使蜂房default.xml.template的副本,它看起來像hive-default.xml(複製).template。

3)將hive-default.xml(複製).template重命名爲hive-site.xml。

4)將hive-env.sh.template複製到hive-env.sh。

在.bashrc文件

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 

通過

start-all.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)出口Hadoop和蜂巢路徑開始你的你的Hadoop配置單元。根據你的系統給出口命令中的hadoop和hive路徑。如果不行,請告訴我。

+0

感謝Kishore的步驟。我正在創建該文件。 – sean 2014-12-02 18:53:03

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的。

+0

謝謝拉維。我現在已經創建了hive-site.xml文件。 – sean 2014-12-02 18:53:57

+0

如果它的幫助使它投票... – 2014-12-03 05:14:57