Hi Ashok,

 

Thank you for your kind remarks.

 

I shall endeavour to get the write-up on how to make Hive use Spark as 
execution engine as soon as possible.

 

With regard to why having Hive using Spark as opposed to default MapReduce, I 
think we ought to look at case by case.

 

 

The standard MapReduce (MR) as I know reads the data from HDFS, apply MR 
algorithm and writes back to HDFS. If there are many iterations of MR then, 
there will be many intermediate writes to HDFS. This is all serial. Spark is 
supposed to improve the query response by considering the whole DAG (directed 
acyclic graph) of map-reduce steps and optimizing it globally (e.g., pipelining 
consecutive map steps into one, not write intermediate data to HDFS). So in 
short this prevents writing data back and forth after every reduce step. 
However, Spark relies on the available memory. As I recall which I think it is 
generally applicable to RDBMS (Oracle, Sybase) and Big Data equally, a Logical 
IO (LIO) is around 20 times faster than a Physical IO (PIO). The first one is 
read from buffer cache (memory) and the latter is disk read. So hence Spark 
wins on that front. However, the caveat is – please correct me if I am wrong, 
if you do not have enough RAM to keep the intermediate data in memory, then the 
data has to spill to disk much like the classic Hash Joins in RDNMS. Once Spark 
start doing that then the advantage goes away.

 

So in summary Spark is more performant where the underlying query results in 
many intermediate stages that can be fit into memory say multiple joins on many 
tables with smaller result set.. For such small/medium size (these being 
relative terms) queries, using MapReduce is like breaking a nut with 
sledgehammer. On the other hand for classic large batch volumes where the query 
response is secondary and large volumes are involved then MapReduce combines 
storage economy (HDFS actually) plus ab efficient computation albeit 
serialized. My understanding is that Tez is effectively a MapReduce engine with 
DAG on top. Having said that I have not used Tez personally.

 

HTH

 

Mich Talebzadeh

 

Sybase ASE 15 Gold Medal Award 2008

A Winning Strategy: Running the most Critical Financial Data on ASE 15

http://login.sybase.com/files/Product_Overviews/ASE-Winning-Strategy-091908.pdf

Author of the books "A Practitioner’s Guide to Upgrading to Sybase ASE 15", 
ISBN 978-0-9563693-0-7. 

co-author "Sybase Transact SQL Guidelines Best Practices", ISBN 
978-0-9759693-0-4

Publications due shortly:

Complex Event Processing in Heterogeneous Environments, ISBN: 978-0-9563693-3-8

Oracle and Sybase, Concepts and Contrasts, ISBN: 978-0-9563693-1-4, volume one 
out shortly

 

http://talebzadehmich.wordpress.com <http://talebzadehmich.wordpress.com/> 

 

NOTE: The information in this email is proprietary and confidential. This 
message is for the designated recipient only, if you are not the intended 
recipient, you should destroy it immediately. Any information in this message 
shall not be understood as given or endorsed by Peridale Technology Ltd, its 
subsidiaries or their employees, unless expressly so stated. It is the 
responsibility of the recipient to ensure that this email is virus free, 
therefore neither Peridale Ltd, its subsidiaries nor their employees accept any 
responsibility.

 

From: Ashok Kumar [mailto:ashok34...@yahoo.com] 
Sent: 07 December 2015 22:19
To: User <user@hive.apache.org>
Subject: Fw: Managed to make Hive run on Spark engine

 

 

This is great news sir. It shows perseverance pays at last.

 

Can you inform us when the write-up is ready so I can set it up as well please.

 

I know a bit about the advantages of having Hive using Spark engine. However, 
the general question I have is when one should use Hive on spark as opposed to 
Hive on MapReduce engine?

 

Thanks again

Reply via email to