hive-metastore

Hive Metastore
Hive Metastore

Metastore is a central repository of Hive Metadata

Metastore comprises two parts

Metadata service - Communicates with Hive driver and returns all Metadata it needed

Metadata Database - stores all metadata information inform of tables

What Metastore contains

  1. All Databases Metadata - Ids, Creation date, Owners
  2. All Tables Information - Custom properties, Schema Info, Indexes, Partitions with their Owners & creation date
  3. Rows input & output formats and Serializers/ Deserializers info
  4. All Users Information - Asigned Roles
Stages in execution


Metastore can be configured in either Embedded, Local or Remote location
Embedded Metastore - Service & Database(Derby by default) runs on same JVM where Hive runs and supports single session at a time.
Local Metastore service runs on same JVM like Hive but connects to external Database. Supports multiple sessions at a time.
In Remote Metastore mode, Metastore services runs on different processes, hosts and supports multiple sessions with added security

Metastore Configurations

hive.metastore.warehouse.dir - /user/hive/warehouse (default) or external
hive.metastore.local - true(default) to use embedded metastore, if false configure hive.metastore.uris
hive.metastore.uris - CSV of Remote Metastore URLs
javax.jdo.option.ConnectionURL - Metastore connection URL Eg. jdbc:derby:;databaseName=metastore_db;create=true(default) or jdbc:mysql://localhost:3306/hive_mysql_db?createDatabaseIfNotExist=true
javax.jdo.option.ConnectionDriverName - Eg. org.apache.derby.jdbc.EmbeddedDriver(default) or com.mysql.jdbc.Driver
javax.jdo.option.ConnectionUserName - DB username
javax.jdo.option.ConnectionPassword - DB password

Comments

Popular posts from this blog

hadoop-installation-ubuntu

jenv-tool

hive-installation-in-ubuntu