您好,欢迎来到尔游网。
搜索
您的当前位置:首页Centos7 安装hive

Centos7 安装hive

来源:尔游网

安装hive

配置hive

首先启动hadoop任务

hdfs dfs -mkdir /tmp

hdfs dfs -mkdir /user

hdfs dfs -mkdir /user/hive

hdfs dfs -mkdir /user/hive/warehouse

 

给新建的文件夹增加权限!

hadoop fs -chmod g+w /tmp

hadoop fs -chmod g+w /user/hive/warehouse

并将之命名为:hive-site.xml

cp hive-default.xml.template hive-site.xml

使用vi hive-site.xml

修改下列属性值(通过/指令寻找,如果第一个定位不正确,n寻找下一个)

<property>

    <name>javax.jdo.option.ConnectionURL</name>

    <value>jdbc:mysql://127.0.0.1:3306/hive?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>root</value>

    <description>Username to use against metastore database</description>

  </property>

  <property>

    <name>javax.jdo.option.ConnectionPassword</name>

    <value>sa</value>

    <description>password to use against metastore database</description>

  </property>

  

  <property>

    <name>hive.exec.local.scratchdir</name>

    <value>/usr/tools/apache-hive-2.1.0-bin/tmp</value>

    <description>Local scratch space for Hive jobs</description>

  </property>

  <property>

    <name>hive.downloaded.resources.dir</name>

    <value>/usr/tools/apache-hive-2.1.0-bin/tmp/resources</value>

    <description>Temporary local directory for added resources in the remote file system.</description>

  </property>

  <property>

    <name>hive.querylog.location</name>

    <value>/usr/tools/apache-hive-2.1.0-bin/tmp</value>

    <description>Location of Hive run time structured log file</description>

  </property>

  <property>

    <name>hive.server2.logging.operation.log.location</name>

    <value>/usr/tools/apache-hive-2.1.0-bin/tmp/operation_logs</value>

    <description>Top level directory where operation logs are stored if logging functionality is enabled</description>

  </property>

使用schematool 初始化metastoreschema

schematool -initSchema -dbType mysql

 

运行hive

Hive 出现下面的页面即为安装成功!

 

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- axer.cn 版权所有 湘ICP备2023022495号-12

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务