Hive-2.3.7安装(实际上是3.1.2)

Hive-2.3.7安装(实际上是3.1.2)

官网下载tar.gz

https://mirrors.koehn.com/apache/hive/hive-2.3.7/

在这里插入图片描述

解压到指定目录

tar -zxvf apache-hive-2.3.7-bin.tar.gz -C …/software/
cd …/software
mv apache-hive-2.3.7-bin/ hive-2.3.7
cd hive-2.3.7/conf

vim hive-site.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?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://mysql所在IP地址:3306/hivemetastore?createDatabaseIfNotExist=true</value>
  </property>
  <property>
    <name>javax.jdo.option.ConnectionDriverName</name>
    <value>com.mysql.jdbc.Driver</value>
  </property>
  <property>
    <name>javax.jdo.option.ConnectionUserName</name>
    <value>mysql账号</value>
  </property>
  <property>
    <name>javax.jdo.option.ConnectionPassword</name>
    <value>mysql密码</value>
  </property>
  <property>
    <name>hive.cli.print.current.db</name>
    <value>true</value>
  </property>
  <property>
    <name>hive.cli.print.header</name>
    <value>true</value>
  </property>
  <!-- 绑定运行hiveServer2的主机host,默认localhost -->
  <property>
    <name>hive.server2.thrift.bind.host</name>
    <value>yts1</value>
  </property>
  <!-- 指定hive metastore服务请求的uri地址 -->
  <property>
    <name>hive.metastore.uris</name>
    <value>thrift://yts1:9083</value>
  </property>

</configuration>

下载连接mysql的jar包

https://mvnrepository.com/artifact/mysql/mysql-connector-java/5.1.37

在这里插入图片描述

将jar包放到hive的lib目录中

在这里插入图片描述

vim /etc/profile

export HIVE_HOME=/new/software/hive-2.3.7
export PATH=$PATH:$HIVE_HOME/bin

source /etc/profile

初始化hive

schematool -dbType mysql -initSchema

在这里插入图片描述

替换guava

因为我的hadoop版本是3.3.0,guava的版本不一致,会报错,只需要删除hive/lib中的低版本的guava,把hadoop中高版本的guava放在hive的lib中就ok了

在这里插入图片描述

warning

我的hive是2.3.7 ,hadoop是3.3.0 ,可能是版本不兼容吧,导致最后没法用,最后换了hive 3.1.2的版本,可以使用了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: apache-hive-3.1.2-bin.tar.gz 是Apache Hive的二进制安装包。Apache Hive是一个基于Hadoop的数据仓库工具,可以将结构化数据映射到Hadoop上,并提供SQL查询和数据分析功能。该二进制安装包包含了Hive的所有运行时文件和依赖库,可以方便地进行安装和部署。 ### 回答2: apache-hive-3.1.2-bin.tar.gz是Apache Hive的一个版本,它是一个基于Hadoop的数据仓库和查询工具。Hive是一个开源的数据仓库工具,它提供了类似于SQL的查询语言,使用户能够使用简单的SQL查询Hadoop集群中的数据。 apache-hive-3.1.2-bin.tar.gz是Hive的二进制发布文件,通过下载和解压该文件,可以在Hadoop集群上安装和运行Hive。它包含了运行Hive所需的所有二进制文件、配置文件和库文件。 Hive可以将结构化数据映射为表,并提供了类似于SQL的查询语言- HiveQL,使用户可以使用熟悉的SQL语法对数据进行查询和分析。Hive将HiveQL查询转换为MapReduce或Tez任务,然后在Hadoop集群上执行这些任务。这样,用户无需编写复杂的MapReduce程序,就可以利用Hadoop的强大的并行处理能力进行数据分析。 Hive还支持用户自定义函数、用户自定义聚合函数和用户自定义运算符,使用户能够根据自己的需求扩展Hive的功能。此外,Hive还提供了用于数据导入和导出的命令和工具,支持各种数据格式,如文本、CSV、JSON等。 总之,apache-hive-3.1.2-bin.tar.gz是Apache Hive的一个发行版本,通过安装和配置它,用户可以在Hadoop集群上使用Hive来进行数据仓库和查询操作,让用户能够更方便地利用Hadoop进行大数据分析和处理。 ### 回答3: Apache Hive 是一个建立在 Hadoop 之上的数据仓库基础结构,它提供了一种以类似于 SQL 的查询语言来进行数据分析和数据查询的方式。而 apache-hive-3.1.2-bin.tar.gz 是 Apache Hive 的一个二进制发行版本。 在 apache-hive-3.1.2-bin.tar.gz 这个压缩文件中,包含了 Hive 的所有二进制文件和必要的依赖库。通过下载并解压这个压缩包,你就可以在你的系统上快速部署和使用 Hive。 解压后的文件夹结构通常如下: - `bin` 文件夹:包含了 Hive 所有可执行文件,比如用于启动 Hive Shell 的 `hive` 命令。 - `conf` 文件夹:存放了 Hive 的配置文件,包括 Hive 的元数据存储位置、Hadoop 集群的配置等。 - `lib` 文件夹:包含了 Hive 的依赖库文件,这些库文件是 Hive 运行所需的。 - `examples` 文件夹:提供了一些 Hive 的示例查询和数据样例,方便用户了解和学习 Hive 的使用方法。 apache-hive-3.1.2-bin.tar.gz 是 Hive 在 3.1.2 版本的二进制发行包。版本号中的 3.1.2 表示这个发行版是在 Hive 的主版本号 3 下的次要版本号为 1,次次要版本号为 2 的版本。这个版本通常包含了以往版本的修复 bug、增加新功能等改进。 因此,如果你想在你的系统上开始使用 Hive 进行数据仓库的工作,你可以下载 apache-hive-3.1.2-bin.tar.gz 这个发行版,并按照官方文档的指引来进行部署和配置,然后就可以开始编写和执行 Hive 查询了。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值