Creating an MRS Hive Link¶
MRS Hive links are applicable to the MapReduce Service (MRS). This tutorial describes how to create an MRS Hive link.
Prerequisites¶
You have created a CDM cluster.
You have obtained the Manager IP address, and administrator account and password of the MRS cluster, and the account has the permissions to import and export data.
The MRS cluster and the CDM cluster can communicate with each other. The following requirements must be met for network interconnection:
If the CDM cluster and the cloud service are in different regions, a public network or a dedicated connection is required for enabling communication between the CDM cluster and the cloud service. If the Internet is used for communication, ensure that an EIP has been bound to the CDM cluster, the host where the data source is located can access the Internet, and the port has been enabled in the firewall rules.
If the CDM cluster and the cloud service are in the same region, VPC, subnet, and security group, they can communicate with each other by default. If they are in the same VPC but in different subnets or security groups, you must configure routing rules and security group rules. For details about how to configure routing rules, see Adding Routes in Virtual Private Cloud (VPC) Usage Guide. For details about how to configure security group rules, see Security Group > Adding a Security Group Rule in Virtual Private Cloud (VPC) Usage Guide.
The cloud service instance and the CDM cluster belong to the same enterprise project. If they do not, you can modify the enterprise project of the workspace.
Creating an MRS Hive Link¶
On the Cluster Management page, locate a cluster and click Job Management in the Operation column. On the displayed page, click the Links tab and then Create Link.
Select MRS Hive and click Next to configure parameters for the MRS Hive link.
Click Show Advanced Attributes and set optional parameters. For details, see Link to a Common Relational Database. Retain the default values for the optional parameters and configure the mandatory parameters according to Table 1.
¶ Parameter
Description
Example Value
Name
Link name, which should be defined based on the data source type, so it is easier to remember what the link is for
mrs-link
Manager IP
Floating IP address of MRS Manager. Click Select next to the Manager IP text box to select an MRS cluster. CDM automatically fills in the authentication information.
127.0.0.1
Authentication Method
Authentication method used for accessing MRS
SIMPLE: Select this for non-security mode.
KERBEROS: Select this for security mode.
SIMPLE
HIVE Version
Set this to the Hive version on the server.
HIVE_3_X
Username
If Authentication Method is set to KERBEROS, you must provide the username and password used for logging in to MRS Manager. If you need to create a snapshot when exporting a directory from HDFS, the user configured here must have the administrator permission on HDFS.
To create a data connection for an MRS security cluster, do not use user admin. The admin user is the default management page user and cannot be used as the authentication user of the security cluster. You can create an MRS user and set Username and Password to the username and password of the created MRS user when creating an MRS data connection.
Note
If the CDM cluster version is 2.9.0 or later and the MRS cluster version is 3.1.0 or later, the created user must have the permissions of the Manager_viewer role to create links on CDM. To perform operations on databases, tables, and data of a component, you also need to add the user group permissions of the component to the user.
If the CDM cluster version is earlier than 2.9.0 or the MRS cluster version is earlier than 3.1.0, the created user must have the permissions of Manager_administrator or System_administrator to create links on CDM.
A user with only the Manager_tenant or Manager_auditor permission cannot create connections.
cdm
Password
Password used for logging in to MRS Manager
-
OBS storage support
The server must support OBS storage. When creating a Hive table, you can store the table in OBS.
No
Run Mode
This parameter is used only when the Hive version is HIVE_3_X. Possible values are:
EMBEDDED: The link instance runs with CDM. This mode delivers better performance.
Standalone: The link instance runs in an independent process. If CDM needs to connect to multiple Hadoop data sources (MRS, Hadoop, or CloudTable) with both Kerberos and Simple authentication modes, select STANDALONE or configure different agents.
Note: The STANDALONE mode is used to solve the version conflict problem. If the connector versions of the source and destination ends of the same link are different, a JAR file conflict occurs. In this case, you need to place the source or destination end in the STANDALONE process to prevent the migration failure caused by the conflict.
EMBEDDED
Use Cluster Config
You can create cluster configurations on the Links page to simplify the configuration of Hadoop link parameters.
No
Note
Click Show Advanced Attributes, and then click Add to add configuration attributes of other clients. The name and value of each attribute must be configured. You can click Delete to delete no longer used attributes.
Click Save to return to the Linkspage.