[hive学习翻译]Hive - Introduction

 

术语“大数据”用于大数据集的集合,包括大量,高速度和各种日益增加的数据。使用传统的数据管理系统,很难处理大数据。因此,Apache Software Foundation引入了一个称为Hadoop的框架来解决大数据管理和处理难题。

Hadoop
Hadoop是一个开放源代码框架,用于在分布式环境中存储和处理大数据。它包含两个模块,一个是MapReduce,另一个是Hadoop分布式文件系统(HDFS)。

MapReduce:它是一个并行编程模型,用于在大型商品硬件集群上处理大量的结构化,半结构化和非结构化数据。

HDFS:Hadoop分布式文件系统是Hadoop框架的一部分,用于存储和处理数据集。它提供了一个容错文件系统在商用硬件上运行。

Hadoop生态系统包含用于帮助Hadoop模块的不同子项目(工具),如Sqoop,Pig和Hive。

Sqoop:用于在HDFS和RDBMS之间导入和导出数据。

Pig:这是一个用于为MapReduce操作开发脚本的过程语言平台。

Hive:它是一个用于开发SQL类型脚本以执行MapReduce操作的平台。

注意:有多种方法来执行MapReduce操作:

使用Java MapReduce程序的传统方法用于结构化,半结构化和非结构化数据。
使用Pig来处理结构化和半结构化数据的MapReduce的脚本方法。
Hive查询语言(HiveQL或HQL),用于MapReduce使用Hive处理结构化数据。


什么是Hive
Hive是一个用于在Hadoop中处理结构化数据的数据仓库基础结构工具。它驻留在Hadoop之上,用于总结大数据,并使查询和分析变得容易。

最初Hive由Facebook开发,后来Apache软件基金会将其开发并进一步开发为Apache Hive名下的开源软件。它被不同的公司使用。例如,Amazon在Amazon Elastic MapReduce中使用它。

Hive不是

  • 关系数据库
  • 用于线上事务处理(OLTP)
  • 用于实时查询和行级更新的语言

Hive的特点

  • 它将模式存储在数据库中,并将处理后的数据存储到HDFS中。
  • 它是为OLAP设计的。
  • 它提供了用于查询的SQL类型语言,称为HiveQL或HQL。
  • 它是熟悉,快速,可扩展和可扩展。

以下组件图描述了Hive的体系结构:

This component diagram contains different units. The following table describes each unit:

Unit NameOperation
User Interface

Hive is a data warehouse infrastructure software that can create interaction between user and HDFS. The user interfaces that Hive supports are Hive Web UI, Hive command line, and Hive HD Insight (In Windows server).

Hive是一个数据仓库基础设施软件,可以创建用户和HDFS之间的交互。 Hive支持的用户界面有Hive Web UI,Hive命令行和Hive HD Insight(在Windows服务器中)。

Meta Store

Hive chooses respective database servers to store the schema or Metadata of tables, databases, columns in a table, their data types, and HDFS mapping.

Hive选择相应的数据库服务器来存储表,数据库,表中的列,其数据类型和HDFS映射的模式或元数据。

HiveQL Process Engine

HiveQL is similar to SQL for querying on schema info on the Metastore. It is one of the replacements of traditional approach for MapReduce program. Instead of writing MapReduce program in Java, we can write a query for MapReduce job and process it.

HiveQL类似于SQL用于查询Metastore上的模式信息。 它是MapReduce程序的传统方法的替代品之一。 代替在Java中编写MapReduce程序,我们可以为MapReduce作业编写一个查询并处理它。

Execution Engine

The conjunction part of HiveQL process Engine and MapReduce is Hive Execution Engine. Execution engine processes the query and generates results as same as MapReduce results. It uses the flavor of MapReduce.

HiveQL进程Engine和MapReduce的连接部分是Hive执行引擎。 执行引擎处理查询并生成与MapReduce结果相同的结果。 它使用MapReduce的风格。

HDFS or HBASE

Hadoop distributed file system or HBASE are the data storage techniques to store data into file system.

Hadoop分布式文件系统或HBASE是将数据存储到文件系统中的数据存储技术。

 

 

Working of Hive

 

The following diagram depicts the workflow between Hive and Hadoop.

下图描述了Hive和Hadoop之间的工作流。

How Hive Works

The following table defines how Hive interacts with Hadoop framework:

 

Step No.Operation
1Execute Query

The Hive interface such as Command Line or Web UI sends query to Driver (any database driver such as JDBC, ODBC, etc.) to execute.

2Get Plan

The driver takes the help of query compiler that parses the query to check the syntax and query plan or the requirement of query.

3Get Metadata

The compiler sends metadata request to Metastore (any database).

4Send Metadata

Metastore sends metadata as a response to the compiler.

5Send Plan

The compiler checks the requirement and resends the plan to the driver. Up to here, the parsing and compiling of a query is complete.

6Execute Plan

The driver sends the execute plan to the execution engine.

7Execute Job

Internally, the process of execution job is a MapReduce job. The execution engine sends the job to JobTracker, which is in Name node and it assigns this job to TaskTracker, which is in Data node. Here, the query executes MapReduce job.

7.1Metadata Ops

Meanwhile in execution, the execution engine can execute metadata operations with Metastore.

8Fetch Result

The execution engine receives the results from Data nodes.

9Send Results

The execution engine sends those resultant values to the driver.

10Send Results

The driver sends the results to Hive Interfaces.

 

 

 

from:https://www.tutorialspoint.com/hive/hive_introduction.htm

转载于:https://www.cnblogs.com/hager/p/6322867.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Hive-JDBC Uber Jar 是一个包含了所有依赖项的单一 JAR 文件,使得使用 Hive JDBC 连接数据库更加方便。为了下载 hive-jdbc-uber-jar,您可以按照以下步骤进行操作: 1. 打开您的网络浏览器并访问 Apache Hive 的官方网站(https://hive.apache.org/)。 2. 在页面的顶部菜单栏中,您会找到一个"Downloads"(下载)的选项。单击这个选项。 3. 在下载页面上,您可以看到不同的 Hive 版本和相关的下载链接。根据您的需求选择适合的版本。一般建议选择最新版本。 4. 找到并单击下载链接,以启动 hive-jdbc-uber-jar 文件的下载。可以选择一个合适的下载镜像,点击相关链接即可开始下载。 5. 下载完成后,您可以在您指定的下载文件夹中找到 hive-jdbc-uber-jar 文件。可以通过文件管理器打开文件夹并查看文件。 在您下载了 hive-jdbc-uber-jar 文件后,您可以将其添加到您的项目中,并使用 Hive 的 JDBC API 连接到 Hive 数据库。您可以在项目的构建路径中添加该 JAR 文件,并在代码中引入相关的类和方法。确保在代码中正确配置 JDBC 连接参数,如 Hive 服务器的 URL、用户名和密码等。 总结起来,您可以通过在 Apache Hive 官方网站下载页面上选择适当的 Hive 版本并点击相关的下载链接,从中直接下载 hive-jdbc-uber-jar 文件。这个 JAR 文件是使用 Hive JDBC 连接到 Hive 数据库时所需的所有依赖项的集合。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值