Apache Hive Metastore in 2023

Apache Hive Metastore in 2023 :- Hive metastore (HMS) is a provider that shops metadata associated to Apache Hive and different services, in a backend RDBMS, such as MySQL or PostgreSQL. Impala, Spark, Hive, and different offerings share the metastore. The connections to and from HMS consist of HiveServer, Ranger, and the NameNode that represents HDFS.

Apache Hive Metastore
Apache Hive Metastore

Beeline, Hue, JDBC, and Impala shell purchasers make requests via thrift or JDBC to HiveServer. The HiveServer occasion reads/writes records to HMS. By default, redundant HMS function in active/active mode. The bodily records resides in a backend RDBMS, one for HMS. You need to configure all HMS cases to use the identical backend database. A separate RDBMS helps the protection service, Ranger for example. All connections are routed to a single RDBMS provider at any given time. HMS talks to the NameNode over thrift and features as a patron to HDFS.

Metastore Architecture

Metastore is an object keep with a database or file backed store. The database backed keep is applied the usage of an object-relational mapping (ORM) answer referred to as the DataNucleus. The top motivation for storing this in a relational database is queriability of metadata. Some risks of the usage of a separate statistics save for metadata alternatively of the use of HDFS are synchronization and scalability issues. Additionally there is no clear way to put in force an object keep on pinnacle of HDFS due to lack of random updates to files. This, coupled with the benefits of queriability of a relational store, made our strategy a smart one.

The metastore can be configured to be used in a couple of ways: far off and embedded. In far off mode, the metastore is a Thrift service. This mode is beneficial for non-Java clients. In embedded mode, the Hive consumer without delay connects to an underlying metastore the usage of JDBC. This mode is beneficial due to the fact it avoids any other device that desires to be maintained and monitored. Both of these modes can co-exist. (Update: Local metastore is a 0.33 possibility. See Hive Metastore Administration for details.)

Metastore Interface

Metastore offers a Thrift interface to manipulate and question Hive metadata. Thrift offers bindings in many famous languages. Third birthday celebration equipment can use this interface to combine Hive metadata into different enterprise metadata repositories.

Hive Query Language

HiveQL is an SQL-like question language for Hive. It frequently mimics SQL syntax for advent of tables, loading statistics into tables and querying the tables. HiveQL additionally permits customers to embed their customized map-reduce scripts. These scripts can be written in any language the usage of a easy row-based streaming interface – study rows from general enter and write out rows to fashionable output. This flexibility comes at a price of a overall performance hit induced via changing rows from and to strings. However, we have viewed that customers do no longer thinking this given that they can put into effect their scripts in the language of their choice. Another function special to HiveQL is multi-table insert. In this construct, customers can operate more than one queries on the equal enter information the use of a single HiveQL query. Hive optimizes these queries to share the scan of the enter data, as a consequence growing the throughput of these queries quite a few orders of magnitude. We miss extra important points due to lack of space. For a extra whole description of the HiveQL language see the language manual.


More design transformations are carried out by way of the optimizer. The optimizer is an evolving component. As of 2011, it used to be rule-based and carried out the following: column pruning and predicate pushdown. However, the infrastructure was once in place, and there was once work beneath growth to encompass different optimizations like map-side join. (Hive 0.11 introduced a number of be part of optimizations.)

The optimizer can be more suitable to be cost-based (see Cost-based optimization in Hive and HIVE-5775). The sorted nature of output tables can additionally be preserved and used later on to generate higher plans. The question can be carried out on a small pattern of records to wager the statistics distribution, which can be used to generate a higher plan.

A correlation optimizer was once brought in Hive 0.12.

The format is a common operator tree, and can be without difficulty manipulated.


In conclusion, we can say that Hive Metadata is a central repository for storing all the Hive metadata information. Metadata consists of a number of kinds of data like the shape of tables, members of the family etc. Above we have additionally mentioned all the three metastore modes in detail. you can additionally Learn the different massive records applied sciences like Apache Hadoop, Spark, Flink and so on in detail.

Also Read : Apache Hive Tutorial 2023 : Apache Hive Metastore

Get Code

Dheeru Rajpoot

I am Dheeru Rajpoot an Entrepreneur and a Professional Blogger from the city of love and passion Kanpur Utter Pradesh the Heart of India. By Profession I'm a Blogger, Student, Computer Expert, SEO Optimizer. Google Adsense I have deep knowledge and am interested in following Services. CEO - Dheeru Blog ( Dheeru Rajpoot )

Leave a Reply