• HIVE的安装和使用


    1、安装

    1.1、下载apache-hive-0.13.1-bin.tar.gz

    1.2、解压至安装目录

    tar -zxv -f apache-hive-0.13.1-bin.tar.gz  -C ../soft/
    #此处为了方便,进行了文件路径重命名
    mv apache-hive-0.13.1-bin/ hive013

     1.3、修改.bash_profile文件

    export HIVE_HOME=/home/xuelu/soft/hive013
    PATH=$PATH:$HADOOP_HOME/bin:$MAVEN_HOME/bin:$ZOOKEEPER_HOME/bin:$HIVE_HOME/bin

    2、运行

    由于Hive依赖于Hadoop,必须保证hadoop已经安装,并在Path中配置,另外

    In addition, you must create /tmp and /user/hive/warehouse (aka hive.metastore.warehouse.dir) and set them chmod g+w in HDFS before you can create a table in Hive.

    Commands to perform this setup:

      $ $HADOOP_HOME/bin/hdfs dfs -mkdir       /tmp
      $ $HADOOP_HOME/bin/hdfs dfs -mkdir       /user/hive/warehouse
      $ $HADOOP_HOME/bin/hdfs dfs -chmod g+w   /tmp
      $ $HADOOP_HOME/bin/hdfs dfs -chmod g+w   /user/hive/warehouse

    To use the Hive command line interface (CLI) from the shell:

      $ $HIVE_HOME/bin/hive

    原文地址:https://cwiki.apache.org/confluence/display/Hive/GettingStarted

  • 相关阅读:
    Linux 常用命令总结(二)
    Linux(CentOS7)使用 RPM 安装 mysql 8.0.11
    Linux(CentOS7) 相关软件安装
    8、js——字符串
    7、js——数组
    6、js——创建对象方式
    5、js——this说明
    4、js——函数
    4、js——对象
    2、js编写位置
  • 原文地址:https://www.cnblogs.com/xuelu/p/4085702.html
Copyright © 2020-2023  润新知