SparkSQL 与 Spark 上的 Hive - 区别和优缺点? [英] SparkSQL vs Hive on Spark - Difference and pros and cons?

查看:76
本文介绍了SparkSQL 与 Spark 上的 Hive - 区别和优缺点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SparkSQL CLI 内部使用 HiveQL,如果 Hive on spark(HIVE-7292),hive 使用 spark 作为后端引擎.有人可以提供更多信息吗,这两种情况究竟有何不同以及两种方法的优缺点?

SparkSQL CLI internally uses HiveQL and in case Hive on spark(HIVE-7292) , hive uses spark as backend engine. Can somebody throw some more light, how exactly these two scenarios are different and pros and cons of both approaches?

推荐答案

  1. 当 SparkSQL 使用 hive 时

  1. When SparkSQL uses hive

SparkSQL 可以使用 HiveMetastore 来获取存储在 HDFS 中的数据的元数据.此元数据使 SparkSQL 能够对其执行的查询进行更好的优化.这里 Spark 是查询处理器.

SparkSQL can use HiveMetastore to get the metadata of the data stored in HDFS. This metadata enables SparkSQL to do better optimization of the queries that it executes. Here Spark is the query processor.

当 Hive 使用 Spark 请参阅 JIRA 条目:HIVE-7292

When Hive uses Spark See the JIRA entry: HIVE-7292

这里的数据是通过spark访问的.Hive 是查询处理器.因此,我们可以利用 Spark Core 的所有设计功能.但这是 Hive 的重大改进,并且仍在进行中".截至 2016 年 2 月 2 日.

Here the the data is accessed via spark. And Hive is the Query processor. So we have all the deign features of Spark Core to take advantage of. But this is a Major Improvement for Hive and is still "in progress" as of Feb 2 2016.

使用 SparkSQL 处理数据还有第三种选择

There is a third option to process data with SparkSQL

在不使用 Hive 的情况下使用 SparkSQL.这里 SparkSQL 无法访问来自 Hive Metastore 的元数据.并且查询运行速度较慢.我做了一些比较选项 1 和 3 的性能测试.结果在这里.

Use SparkSQL without using Hive. Here SparkSQL does not have access to the metadata from the Hive Metastore. And the queries run slower. I have done some performance tests comparing options 1 and 3. The results are here.

这篇关于SparkSQL 与 Spark 上的 Hive - 区别和优缺点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆