The open-source framework of the leading Big Data platform, Hadoop, is ideal for storing and processing massive quantities of data. However, when it comes to data extraction, this platform is often complex, time-consuming and costly. That's why the Apache Foundation has developed a new alternative. It's called Apache Hive.
As a reminder, in computer programming, a framework designates a coherent set of structural software components used to create the foundations and architecture of a software program.
Apache Hive - what is it?
Apache Hive is an open source datawarehouse for Hadoop. A data warehouse functions as a central repository where information comes from one or more data sources. It collects data from a variety of heterogeneous sources, with the main aim of supporting analysis and querying in a language syntactically close to SQL, and facilitating the decision-making process.
Â
💡Related articles:
![](https://datascientest.com/en/files/2021/04/schema_hadoop-116-1024x562.png)
How does Apache Hive work?
Apache Hive translates programs written in HiveQL (a language close to SQL) into one or more Java MapReduce, Apache Tez or Apache Spark jobs. These are the three runtime engines that can be launched on Hadoop. Apache Hive then organizes the data into an array for the Hadoop Distributed Filed System (HDFS) file, and runs the tasks on a cluster to produce an answer.
Apache Hive arrays are similar to those of a relational database, with data units organized from the largest to the most granular. Databases are made up of tables composed of partitions, which can again be broken down into “buckets”.
Data can be accessed via HiveQL. Within each database, data is numbered, and each array corresponds to an HDFS directory.
Within the Apache Hive architecture, multiple interfaces are available, including web, CLI and external client interfaces. Indeed, the “Apache Hive Thrift” server enables remote clients to submit commands and requests to Apache Hive using a variety of programming languages. Apache Hive’s central directory is a “metastore” containing all information.
The engine that makes Hive work is called the “driver”. It includes a compiler and an optimizer to determine the best execution plan, as well as an executor.
Finally, security is provided by Hadoop. It relies on Kerberos for mutual authentication between client and server. Permissions for newly created files in Apache Hive are dictated by HDFS, which allows authorization by user, group or other criterion.
What are the advantages of using Apache Hive?
Apache Hive is an ideal solution for data queries and analysis. It enables you to obtain qualitative information (“insights”), giving you a competitive edge and facilitating responsiveness to market demand.
Apache Hive’s main advantages include its ease of use, thanks to its SQL-friendly language. What’s more, this software speeds up initial data insertion, as data does not need to be read or numbered on disk in the database’s internal format.
Since the data is stored in HDFS, it is possible to store large datasets of up to hundreds of petabytes of data on Apache Hive. In fact, this solution is far more scalable than a traditional database. As a Cloud service, Apache Hive enables users to rapidly launch virtual servers as workloads fluctuate.
Security is also a priority, with the ability to replicate critical workloads for recovery in the event of a problem. Finally, workload capacity is second to none, with up to 100,000 requests per hour.