• Centos7 安装hive


    安装hive

    配置hive

    hdfs中新建目录/user/hive/warehouse

    首先启动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

    mysql的驱动jarmysql-connector-java-5.1.39-bin.jar拷入hivelib目录下面

    进入hiveconf目录下面复制一下hive-default.xml.template

    并将之命名为: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 出现下面的页面即为安装成功!


     

  • 相关阅读:
    webpack高级概念code splitting 和 splitChunks (系列五)
    webpack高级概念Develoment 和 Production 不同环境的配置 (系列四)
    webpack高级概念Tree Shaking (树摇)(系列三)
    HarmonyOS三方件开发指南(16)-VideoCache 视频缓存
    鸿蒙开源第三方组件——uCrop_ohos图片裁剪组件
    Hi3516如何连接Wifi(三)
    【鸿蒙学院】鸿蒙IDE迎来重大更新,新特性足以让你尖叫
    《鸿蒙系统物联网模组——Neptune 三天全攻略》课件、代码
    预览器和编辑器双重发力,DevEco Studio 2.1 Beta 3强势来袭
    强大的鸿蒙开发环境 —— DevEco Studio 2.1 Beta3发布
  • 原文地址:https://www.cnblogs.com/yangxiansen/p/7860266.html
Copyright © 2020-2023  润新知