testConnectExternalHiveMetaStore

Prev Next

Available in VPC

Check if Cloud DB for MySQL can be integrated with a Cloud Hadoop Hive metastore.

Note

When calling the testConnectExternalHiveMetaStore API, please note the following:

  • Only one account can be integrated per cluster in the form of a USER_ID + HOST (IP).
  • The cluster and MySQL must be in the same VPC, and only MySQL 8.0.x is supported.
  • DDL permission is required for the account integrated with the metastore.
  • Preparations of adding an Cloud Hadoop ACG to the Cloud DB for MySQL ACG is required.
  • Set the DB config variable sql_require_primary_key = OFF in Cloud DB for MySQL. See Manage DB config.
  • When testing the integration, a database in the form of hive_*_CHadoop is created.

Syntax

The testConnectExternalHiveMetaStore syntax is as follows:

./ncloud vhadoop testConnectExternalHiveMetaStore \
    --cloudHadoopInstanceNo <cloud-hadoop-instance-no> \
    --cloudMysqlInstanceNo <cloud-mysql-instance-no> \
    --cloudMysqlUserName <cloud-mysql-user-name> \
    --cloudMysqlUserPassword <cloud-mysql-user-password> \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running testConnectExternalHiveMetaStore.

Required options

The following options are required for testConnectExternalHiveMetaStore.

Options Type Required Description
--cloudHadoopInstanceNo String Required Cluster instance number
--cloudMysqlInstanceNo String Required Cloud DB for MySQL instance number
--cloudMysqlUserName String Required Database user ID
--cloudMysqlUserPassword String Required Database user account password
  • Enter 8-20 characters, including English letters, numbers, and special characters.
  • The special characters ' " ` & + / \ and spaces can't be used.

Common options

For information about the options common to all vhadoop subcommands, see Cloud Hadoop (VPC) options.

Examples

If the request to check whether it is possible to integrate Hive metastore is successful, the result of the request is returned.

Command

The command example is as follows:

./ncloud vhadoop testConnectExternalHiveMetaStore \
    --cloudHadoopInstanceNo 34567890 \
    --cloudMysqlInstanceNo 56789012 \
    --cloudMysqlUserName hiveuser \
    --cloudMysqlUserPassword Examplepw123! \
    --regionCode KR \
    --output json

Output

The output example is as follows:

{
  "testConnectExternalHiveMetaStoreResponse": {
    "requestId": "293a4b5c-0d1e-f678-2345-9abcdef6789a",
    "returnCode": "0",
    "returnMessage": "success"
  }
}