hive部署

解压hive.tart.gz  将其命名为hive

1. cd hive/conf/

2. cp hive-default.xml hive-site.xml

3. vim hive-site.xml

注意修改主机名,mysql用户名,和密码

且要保证mysql 能被远程登录,用户拥有足够权限,在这里不做细说

<property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:mysql://ubuntu-00:3306/metastore?createDatabaseIfNotExist=true</value>
    <description>JDBC connect string for a JDBC metastore</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>ldy</value>
    <description>username to use against metastore database</description>
 </property>

 <property>
    <name>javax.jdo.option.ConnectionPassword</name>
    <value>ldy</value>
    <description>password to use against metastore database</description>
 </property>

 <property>
    <name>datanucleus.schema.autoCreateAll</name>
    <value>true</value>
  </property>

 

4.  vim hive-env.sh

注明 hadoop安装路径,hive的conf环境即可

# Set HADOOP_HOME to point to a specific hadoop install directory
export HADOOP_HOME=/home/ldy/apps/hadoop-2.8.5

# Hive Configuration Directory can be controlled by:
export HIVE_CONF_DIR=/home/ldy/apps/hive/conf

 

5. 配置环境变量

 

6. schematool -dbType mysql -initSchema --verbose 

初始化数据, 这一步往往会出错,具体问题具体分析

 

7.启动hive

hive部署

 

上一篇:c#-Winforms测试应用程序指南


下一篇:是否有Android Emulator AVD的存储库?