Help Center/ Migration Center/ Best Practices/ Verifying Big Data Consistency After Migration/ Verifying the Consistency of Data Migrated from Alibaba Cloud MaxCompute to Huawei Cloud DLI
Updated on 2025-02-17 GMT+08:00

Verifying the Consistency of Data Migrated from Alibaba Cloud MaxCompute to Huawei Cloud DLI

This section describes how to use MgC to verify the consistency of data migrated from Alibaba Cloud MaxCompute to Huawei Cloud MRS Hive.

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

  1. Sign in to the MgC console.
  2. In the navigation pane on the left, choose Settings.
  3. Under Migration Projects, click Create Project.

    Figure 1 Creating a project

  4. Set Project Type to Complex migration (for big data), enter a project name, and click Create.

    Figure 2 Creating a big data migration project

  5. Connect the MgC Agent to MgC. For more information, see Connecting the MgC Agent to MgC.
  6. After the connection is successful, add the AK/SK pair for accessing MaxCompute and the username/passwords pairs for accessing Hive Metastore and MRS executor to the MgC Agent. For more information, see Adding Resource Credentials.

  7. In the navigation pane, choose Migrate > Big Data Verification. In the navigation pane, under Project, select the project created in step 4.
  8. 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.

  9. In the Features area, click Preparations.
  10. Choose Connection Management and click Create Connection.

    Figure 3 Creating a connection

  11. On the Select Connection Type page, select MaxCompute and click Next.

  12. Configure the parameters for creating a MaxCompute connection, and click Test. If the test is successful, the connection is set up.

    Table 1 Parameters for creating a MaxCompute connection

    Parameter

    Configuration

    Connection To

    Select Source.

    Connection Name

    The default name is MaxCompute-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.

    Alibaba Cloud Credential

    Select the MaxCompute credential added to the MgC Agent in step 6.

    MaxCompute Project

    Enter the name of your MaxCompute project. You can obtain the project name from the MaxCompute console.

    Endpoint

    Enter the endpoint of the region where the MaxCompute project is located.

    For details about the MaxCompute endpoints in different regions, see MaxCompute Endpoints.

  13. After the connection test is successful, click Confirm. The cloud service connection is set up.
  14. Choose Metadata Management and click Create Metadata Collection Task.

    Figure 4 Create Metadata Collection Task

  15. 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

    Enter the names of the databases whose metadata needs to be collected. Use commas (,) to separate the database names.

    NOTICE:

    This parameter is mandatory only if a MaxCompute metadata connection is selected.

    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.

  16. 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

  17. Click Execute Task in the Operation column to run the task. Each time the task is executed, a task execution is generated.
  18. 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

  19. In the Features area, click Table Management.
  20. 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.

  21. 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.

  22. In the Features area, click Preparations.
  23. Choose Connection Management and click Create Connection.

    Figure 7 Creating a connection

  24. On the Select Connection Type page, select MRS executor and click Next.

  25. Set connection parameters based on Table 4 and click Test. If the test is successful, the connection is set up.

    Table 4 Parameters for creating an executor connection

    Parameter

    Configuration

    Connection To

    Select Target.

    Connection Name

    The default name is Executor type-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.

    Executor Credential

    Select the MRS executor credential added to the MgC Agent in step 6.

    Executor IP Address

    Enter the IP address for connecting to the executor.

    Executor Port

    Enter the port for connecting to the executor. The default port is 22.

    Installation Directory

    Enter the installation directory of the MRS client. That is, the directory where ./install.sh is installed.

    SQL File Location

    Enter a directory for storing the SQL files generated for consistency verification. You must have the read and write permissions for the directory.

    NOTICE:

    After the migration is complete, you need to manually clear the folders generated at this location to release storage space.

    Collect Usage Metrics

    This parameter is optional. If this option is enabled, usage metrics for your big data resources will be collected during the execution of tasks created using this connection. The collected information is used to generate reports on the MgC console and for performance optimization.

    NOTICE:

    Before using this function, ensure that the Huawei Cloud account you added to the MgC Agent has the read-only permission for MRS and DLI.

    • If the selected credential is the one you currently use to access MgC, you can select This is my MgC credential, and the projects in the region you choose will be listed.
      • Under Region, select the region where the data to be verified is located.
      • Under Project, select the project where the data to be verified is stored.
      • Under Cluster ID, enter the ID of the cluster where the data to be verified is located.
    • If the selected Doris credential is not the one you currently use to access MgC:
      • Under Region ID, enter the ID of the region where the data to be verified is located. For example, if the region is CN South-Guangzhou, enter cn-south-1.
      • Under Project ID, enter the project ID corresponding to the region.
      • Under Cluster ID, enter the ID of the cluster where the data to be verified is located.
    NOTE:

  26. On the MgC console, create a verification task for the source and target Hive clusters, respectively, and execute the tasks. For details, see Creating and Executing Verification Tasks. Select the table group created in step 20 and the MRS executor connection created in step 25.

    • On the Select Task Type page, choose Hive.

    • Select a verification method. For details about each verification method, see Verification Methods.

  27. 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.