Verifying the Consistency of Data Migrated Between MRS Doris Clusters or from CDH or EMR to MRS Doris
This section describes how to use MgC to verify the consistency of data migrated between Huawei Cloud MRS Doris clusters or migrated from self-built CDH or EMR clusters to Huawei Cloud MRS Doris clusters.
Preparations
Install the MgC Agent, an MgC tool used for data verification, in the source intranet environment and register an account for using the MgC Agent. For details, see Installing the MgC Agent for Linux.
Procedure
- Sign in to the MgC console.
- In the navigation pane on the left, choose Settings.
- Under Migration Projects, click Create Project.
Figure 1 Creating a project
- Set Project Type to Complex migration (for big data), enter a project name, and click Create.
Figure 2 Creating a big data migration project
- Connect the MgC Agent to MgC. For more information, see Connecting the MgC Agent to MgC.
- After the connection is successful, add the username/password pairs for accessing the source and target executors to the MgC Agent. For more information, see Adding Resource Credentials.
If the source MRS Hive cluster is secured (with Kerberos authentication enabled), add the Hive Metastore credential. You need to set Type to Big Data - Hive Metastore and Authentication to Username/Key. Upload the core-site.xml, hivemetastore-site.xml, hive-site.xml, krb5.conf, and user.keytab files. For details about how to obtain the certificate file, see How Do I Obtain the Hive Metastore Credential Files?
- In the navigation pane, choose Migrate > Big Data Verification. In the navigation pane, under Project, select the project created in step 4.
- If you are performing a big data verification with MgC for the first time, select your MgC Agent to enable this feature. Click Select MgC Agent. In the displayed dialog box, select the MgC Agent you connected to MgC from the drop-down list.
Ensure that the selected MgC Agent is always Online and Enabled before your verification is complete.
- In the Features area, click Preparations.
- Choose Connection Management and click Create Connection.
Figure 3 Creating a connection
- On the Select Connection Type page, select Hive Metastore and click Next.
- Configure the parameters for creating a Hive Metastore connection, and click Test. If the test is successful, the connection is set up.
Table 1 Parameters for creating a Hive Metastore connection Parameter
Configuration
Connection To
Select Source.
Connection Name
The default name is Hive-Metastore-4 random characters (including letters and numbers). You can also customize a name.
MgC Agent
Select the MgC Agent connected to MgC in step 5.
Secure Connection
Decide whether to enable secure connection.
- If Hive Metastore is deployed in an unsecured cluster, do not enable secure connection.
- If Hive Metastore is deployed in a secured cluster, enable secure connection and provide access credentials. Select the source Hive Metastore credential added to the MgC Agent in step 6.
Hive Version
Select the Hive version at the source.
Hive Metastore IP Address
Enter the IP address for connecting to the Hive Metastore node.
Hive Metastore Thrift Port
Enter the port for connecting to the Hive Metastore Thrift service. The default port is 9083.
Connect to Metadata Database
During an incremental data verification, querying with Hive Metastore on more than 30,000 partitions may lead to a memory overflow (OOM) since all partition information is loaded into memory. Connecting to the MySQL metadata database can effectively prevent this issue.
- If you disable this option, the system queries the information of Hive tables and partitions using Hive Metastore.
- If you enable this option, configure the MySQL database information. The system will query the information of Hive tables and partitions through the MySQL database. You need to set the following parameters:
- Metadata Database Type: Only MySQL is supported.
- MySQL Credential: Select the credential for accessing the MySQL database. You need to add the credential to the MgC Agent and synchronize it to MgC. For details, see Adding Resource Credentials.
- MySQL Node IP Address: Enter the IP address of the MySQL database server.
- MySQL Port: Enter the port of the MySQL database service.
- Database Name: Enter the name of the database that stores the Hive table metadata.
NOTE:Ensure that the entered MySQL credential, node IP address, service port, and database name match the MySQL database used by Hive. Otherwise, data verification will fail.
- After the connection test is successful, click Confirm. The cloud service connection is set up.
- Choose Metadata Management and click Create Metadata Collection Task.
Figure 4 Create Metadata Collection Task
- Configure the parameters for creating a metadata collection task and click Confirm.
Table 2 Parameters for configuring a metadata collection task Parameter
Configuration
Task Name
The default name is Metadata-Collection-4 random characters (including letters and numbers). You can also specify a name.
Metadata Connection
Select the connection created in step 12.
Databases (Optional)
Enter the names of the databases whose metadata needs to be collected. If no database name is specified, the metadata of all databases is collected.
Concurrent Threads
Set the maximum number of threads for executing the collection. The default value is 3. The value ranges from 1 to 10. Configuring more concurrent threads means more efficient collection, but more connection and MgC Agent resources will be consumed.
- Under Tasks, you can review the created metadata collection task and its settings. You can modify the task by choosing More > Modify in the Operation column.
Figure 5 Managing a metadata collection task
- Click Execute Task in the Operation column to run the task. Each time the task is executed, a task execution is generated.
- Click View Executions in the Operation column. Under Task Executions, you can view the execution records of the task and the status and collection result of each task execution. When a task execution enters a Completed status and the collection results are displayed, you can view the list of databases and tables extracted from collected metadata on the Tables tab.
Figure 6 Managing task executions
- In the Features area, click Table Management.
- Under Table Groups, click Create. Configure the parameters for creating a table group and click Confirm.
Table 3 Parameters for creating a table group Parameter
Description
Table Group
Enter a name.
Metadata Connection
Select the connection created in step 12.
CAUTION:A table group can only contain tables coming from the same metadata source.
Verification Rule
Select a rule that defines the method for verifying data consistency and the inconsistency tolerance. You can View More to see the details about the verification rules provided by MgC.
Description (Optional)
Enter a description to identify the table group.
- On the Table Management page, click the Tables tab, select the data tables to be added to the same table group, and choose Option > Add Tables to Group above the list. In the displayed dialog box, select the desired table group and click Confirm.
You can manually import information of incremental data tables to MgC. For details, see Creating a Table Group and Adding Tables to the Group.
- Create a connection to the source and target executors separately. For details, see Creating an Executor Connection. Select the source and target executor credentials added to the MgC Agent in step 6.
- Create a data verification task for the source and target Hive clusters, respectively, and execute the tasks. For more information, see Creating and Executing Verification Tasks. During the task creation, select the table group created in step 20.
- On the Select Task Type page, choose Hive.
- Select a verification method. For details about each verification method, see Verification Methods.
- On the Select Task Type page, choose Hive.
- Wait until the task executions enter a Completed status. You can view and export the task execution results on the Verification Results page. For details, see Viewing and Exporting Verification Results.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot