码迷,mamicode.com
首页 > 其他好文 > 详细

[hive学习翻译]Hive - Introduction

时间:2017-01-20 15:50:23      阅读:394      评论:0      收藏:0      [点我收藏+]

标签:soft   check   tps   集合   http   体系   drive   传统   ogr   

 

术语“大数据”用于大数据集的集合,包括大量,高速度和各种日益增加的数据。使用传统的数据管理系统,很难处理大数据。因此,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之间的工作流。

技术分享

The following table defines how Hive interacts with Hadoop framework:

 

Step No.Operation
1 Execute 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.

2 Get 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.

3 Get Metadata

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

4 Send Metadata

Metastore sends metadata as a response to the compiler.

5 Send 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.

6 Execute Plan

The driver sends the execute plan to the execution engine.

7 Execute 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.1 Metadata Ops

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

8 Fetch Result

The execution engine receives the results from Data nodes.

9 Send Results

The execution engine sends those resultant values to the driver.

10 Send Results

The driver sends the results to Hive Interfaces.

 

 

 

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

[hive学习翻译]Hive - Introduction

标签:soft   check   tps   集合   http   体系   drive   传统   ogr   

原文地址:http://www.cnblogs.com/hager/p/6322867.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!