Hive : Different types of Hive execution engines

Hive @ Freshers.in

Hive is an open-source data warehouse tool built on top of Hadoop. It allows users to write SQL-like queries, called HiveQL, to analyze and manage large datasets stored in Hadoop Distributed File System (HDFS). One of the key features of Hive is its support for multiple execution engines that can be used to execute HiveQL queries. In this article, we will discuss the different types of Hive execution engines.

  1. MapReduce Execution Engine : The MapReduce execution engine is the default execution engine in Hive. It uses the Hadoop MapReduce framework to execute HiveQL queries. It works by breaking down the HiveQL queries into Map and Reduce tasks, which are then executed on different nodes of the Hadoop cluster. The MapReduce execution engine is known for its scalability and fault-tolerance, but it can be slow for some types of queries.
  2. Tez Execution Engine : The Tez execution engine is a more recent addition to Hive. It is an alternative to the MapReduce execution engine that uses the Apache Tez framework to execute HiveQL queries. Tez is a faster and more efficient execution engine than MapReduce, as it can execute queries using a more optimized execution plan. Tez also provides support for interactive queries, which can be useful for ad-hoc analysis.
  3. Spark Execution Engine : The Spark execution engine is another alternative to the MapReduce execution engine. It uses the Apache Spark framework to execute HiveQL queries. Spark is a fast and powerful processing engine that is particularly well-suited for iterative and interactive queries. It also provides support for in-memory processing, which can speed up queries that require frequent data access.
  4. Vectorized Query Execution : Vectorized query execution is a feature in Hive that can be used with any of the above execution engines. It works by processing data in batches rather than row-by-row, which can significantly improve query performance. Vectorization is particularly effective for queries that involve complex arithmetic operations.
  5. LLAP (Live Long and Process) :  LLAP is a more recent addition to Hive, and it stands for “Live Long and Process”. It is a hybrid execution engine that combines the speed of in-memory processing with the scalability of Hadoop. LLAP works by keeping data in memory, which can dramatically reduce query latency. It also provides support for caching, which can further improve query performance.

Hive supports a variety of execution engines that can be used to execute HiveQL queries. The choice of execution engine depends on the specific requirements of the query, such as the size of the dataset and the complexity of the query. The MapReduce execution engine is the default option, but the Tez, Spark, Vectorized, and LLAP execution engines are all viable alternatives that can offer improved performance and scalability.

Author: user

Leave a Reply