Updated on 2023-08-31 GMT+08:00

Hive Sample Project

To obtain an MRS sample project, visit https://github.com/huaweicloud/huaweicloud-mrs-example and switch to the branch that matches the MRS cluster version. Download the package to the local PC and decompress it to obtain the sample project of each component.

MRS provides the following Hive sample projects.
Table 1 Hive sample projects

Sample Project Location

Description

  • hive-examples/hive-jdbc-example
  • hive-examples/hive-jdbc-example-multizk

Java program for Hive JDBC to process data.

In this project, JDBC APIs are used to connect to Hive and perform data operations. You can use JDBC APIs to create tables, load data, and query data. You can access FusionInsight ZooKeeper and third-party ZooKeeper in the same client process at the same time. For details, see Accessing Hive with JDBC.

hive-examples/hcatalog-example

Java program for Hive HCatalog to process data.

You can use HCatalog APIs to define and query MRS Hive metadata using a Hive command line interface. For details about the example, see Access Hive with HCatalog.

hive-examples/python-examples

Python program to connect to Hive and execute SQL examples.

You can use Python to connect to Hive and submit data analysis tasks. For details about the example, see Accessing Hive Using Python.

hive-examples/python3-examples

Python 3 program to connect to Hive and execute SQL statements.

You can use Python 3 to connect to Hive and submit data analysis tasks. For details about the example, see Accessing Hive Using Python 3.