The metadata for Hive tables and partitions are stored in the Hive Metastore. By default, the Hive Metastore stores
all Hive metadata in an embedded Apache Derby database in the MapR file system. Derby only allows one connection at
a time; if you want multiple concurrent Hive sessions, you can use MySQL for the Hive Metastore.

Before you start developing applications on MapR’s Converged Data Platform, consider how you will get the data onto the
platform, the format it will be stored in, the type of processing or modeling that is required, and how the data will
be accessed.

A MapR Ecosystem Pack (MEP) provides a set of ecosystem components that work together on one or more MapR cluster versions. Only one version of
each ecosystem component is available in each MEP. For example, only one version of Hive and one version of Spark is supported in a MEP.

The metadata for Hive tables and partitions are stored in the Hive Metastore. By default, the Hive Metastore stores
all Hive metadata in an embedded Apache Derby database in the MapR file system. Derby only allows one connection at
a time; if you want multiple concurrent Hive sessions, you can use MySQL for the Hive Metastore.

MapR supports public APIs for MapR-FS, MapR-DB, and MapR-ES. These APIs are available for application development purposes.

Use MySQL for the Hive Metastore

The metadata for Hive tables and partitions are stored in the Hive Metastore. By
default, the Hive Metastore stores all Hive metadata in an embedded Apache Derby database in
the MapR file system. Derby only allows one connection at a time; if you want multiple concurrent Hive
sessions, you can use MySQL for the Hive Metastore.

Review the following prerequisites before you begin:

Make sure MySQL is installed on the machine on which you want to run the Metastore,
and make sure you are able to connect to the MySQL Server from the Hive machine. You
can run the Hive Metastore on any machine that is accessible from Hive. You can test
this with the following
command:

mysql -h <hostname> -u <user>

The database administrator must create a database for the Hive metastore data, and
the username specified in javax.jdo.option.ConnectionUserName must
have permissions to access it. The database can be specified using the
ConnectionURL parameter. The tables and schemas are created
automatically when the metastore is first started.

Note: In MapR 6.1.0 and earlier releases, the following steps can be used interchangeably for MariaDB.

Complete the following steps to configure Hive to use MySQL for the Hive Metastore:

Update the hive-site.xml in the Hive configuration directory
(/opt/mapr/hive/hive-<version>/conf) with the following
contents:

If you want the Hive Metastore to be managed with standard hive commands:

/opt/mapr/hive/hive-<version>/bin/hive --service metastore --start

You can use also use nohup hive --service metastore to run the
Metastore in the background.

Warning: If you have not configured a MySQL Metastore, do not run the
Hive shell from a MapR NFS mount location. If you try to do this, Hive will
fail. The same problem will occur if you use the hive-site.xml
file to configure the Metastore on a MapR NFS mount location. Avoid both of
these configurations.