Spark SQL supports most commonly used features of HiveQL. However,
different HiveQL statements are executed in different manners:
1.
DDL statements (e.g. |CREATE TABLE|, |DROP TABLE|, etc.) and
commands (e.g. |SET <key> = <value>|, |ADD FILE|, |ADD JAR|, etc.)
In most cases, Spark SQL simply delegates these statements to Hive,
as they don’t need to issue any distributed jobs and don’t rely on
the computation engine (Spark, MR, or Tez).
2.
|SELECT| queries, |CREATE TABLE ... AS SELECT ...| statements and
insertions
These statements are executed using Spark as the execution engine.
The Hive classes packaged in the assembly jar are used to provide entry
points to Hive features, for example:
1. HiveQL parser
2. Talking to Hive metastore to execute DDL statements
3. Accessing UDF/UDAF/UDTF
As for the differences between Hive on Spark and Spark SQL’s Hive
support, please refer to this article by Reynold:
https://databricks.com/blog/2014/07/01/shark-spark-sql-hive-on-spark-and-the-future-of-sql-on-spark.html
Cheng
On 3/14/15 10:53 AM, [email protected] wrote:
Thanks Daoyuan.
What do you mean by running some native command, I never thought that
hive will run without an computing engine like Hadoop MR or spark. Thanks.
------------------------------------------------------------------------
[email protected]
*From:* Wang, Daoyuan <mailto:[email protected]>
*Date:* 2015-03-13 16:39
*To:* [email protected] <mailto:[email protected]>; user
<mailto:[email protected]>
*Subject:* RE: Explanation on the Hive in the Spark assembly
Hi bit1129,
1, hive in spark assembly removed most dependencies of hive on
Hadoop to avoid conflicts.
2, this hive is used to run some native command, which does not
rely on spark or mapreduce.
Thanks,
Daoyuan
*From:*[email protected] [mailto:[email protected]]
*Sent:* Friday, March 13, 2015 4:24 PM
*To:* user
*Subject:* Explanation on the Hive in the Spark assembly
Hi, sparkers,
I am kind of confused about hive in the spark assembly. I think
hive in the spark assembly is not the same thing as Hive On
Spark(Hive On Spark, is meant to run hive using spark execution
engine).
So, my question is:
1. What is the difference between Hive in the spark assembly and
Hive on Hadoop?
2. Does Hive in the spark assembly use Spark execution engine or
Hadoop MR engine?
Thanks.
------------------------------------------------------------------------
[email protected] <mailto:[email protected]>