The whole process of configuring hive metadata to MySQL

The whole process of configuring hive metadata to MySQL
  • In the hive installation directory, enter the conf directory and create a hive-site.xml file
  • Configure parameters according to the official documentation and copy the data to the hive-site.xml file
    https://cwiki.apache.org/confluence/display/Hive/AdminManual+MetastoreAdmin

Note: Create a metastore database first, and use latin1 as the character set

Copy the mysql driver to the hive lib directory. (This is related to the previous article on installing MySQL)

Unzip the driver package

Copy the mysql driver to the hive lib directory

Start hive (don’t forget to start hdfs and yarn first~~)

start-dfs.sh
start-yarn.sh
hive

Create a table and see if the metadata can be saved in MySQL

Check out the metastore library

TBLS Table


COLUMNS_V2 table


DBS Table

From the above figure, we can see

The structure of metadata

  1. The table information is stored in the tbls table, and foreign key constraints are performed through db_id and the database in the dbs table!
  2. The library information is stored in the dbs table!
  3. The field information exists in the column_v2 table, and the foreign key constraint is performed through CD_ID and the primary key of the table!

Summarize

This is the end of this article about the whole process of configuring hive metadata to Mysql. For more relevant content about configuring hive metadata to Mysql, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to generate Hive table creation statement comment script in MySQL metadata

<<:  Detailed explanation of the usage of sync modifier in Vue3 parent-child component parameter transfer

>>:  Linux deb package decompression, modification and other operation methods code examples

Recommend

MySQL 8.0.11 Installation Tutorial under Windows

This article records the installation tutorial of...

Detailed steps for installing and configuring mysql 5.6.21

1. Overview MySQL version: 5.6.21 Download addres...

How to set the memory size of Docker tomcat

When installing Tomcat in Docker, Tomcat may over...

Example code for making the pre tag automatically wrap

The pre element defines preformatted text. Text en...

Causes and solutions for MySQL deadlock

The database, like the operating system, is a sha...

foreman ubuntu16 quick installation

Quickstart Guide The Foreman installer is a colle...

How to upload and download files between Linux server and Windows system

Background: Linux server file upload and download...

Steps to restore code from a Docker container image

Sometimes the code is lost and you need to recove...

Recommend a cool interactive website made by a front-end engineer

Website link: http://strml.net/ By Samuel Reed Ti...

Steps for importing tens of millions of data into MySQL using .Net Core

Table of contents Preliminary preparation Impleme...

A brief discussion on four solutions for Vue single page SEO

Table of contents 1.Nuxt server-side rendering ap...

In-depth explanation of nginx location priority

location expression type ~ indicates to perform a...

Cause Analysis and Solution of I/O Error When Deleting MySQL Table

Problem phenomenon I recently used sysbench to te...