Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ MapReduce Service/ Best Practices/ Data Migration/ Migrating Data from MRS HDFS to OBS with CDM

Migrating Data from MRS HDFS to OBS with CDM

Updated on 2024-09-10 GMT+08:00

Application Scenarios

With MRS, you can store data in OBS and dedicate MRS clusters solely to computing tasks, isolating storage and compute resources. This approach offers flexible, on-demand scaling at a lower cost, making it well-suited for big data processing.

The Cloud Data Migration (CDM) service supports file-to-file data migration. This topic describes how to migrate data from MRS HDFS to an OBS file system with CDM.

The process of migrating MRS HDFS data to OBS with CDM is as follows:

  1. Creating a CDM Cluster and Binding an EIP to the Cluster
  2. Creating an MRS Link to HDFS
  3. Creating an OBS Link
  4. Creating a Migration Job

Solution Architecture

The CDM simplifies data migration with easy-to-use tools and integrates multiple data sources into a single data lake, streamlining the process and boosting efficiency.

Figure 1 shows the solution for migrating HDFS data to an MRS cluster with CDM.

Figure 1 HDFS data migration

Prerequisites

  • You have obtained the domain name, port number, AK, and SK for accessing OBS.
  • You have created an MRS cluster that contains the Hadoop service.
  • You have the EIP quota and have created an EIP.

Creating a CDM Cluster and Binding an EIP to the Cluster

  1. If CDM is deployed as an independent service, create a CDM cluster by referring to Creating a CDM Cluster. If it is deployed as a component of the DataArts Studio service, create a CDM cluster by referring to Creating a CDM Cluster.

    The key configurations are as follows:

    • The flavor of the CDM cluster is selected based on the amount of data to be migrated. Generally, cdm.medium meets the requirements for most migration scenarios.
    • The VPC, subnet, and security group of the CDM cluster must be the same as those of the MRS cluster.

  2. After the CDM cluster is created, on the Cluster Management page, click Bind Elastic IP in the Operation column to bind an EIP to the cluster. The CDM cluster uses the EIP to access MRS HDFS.

    NOTE:

    If SSL encryption is configured for the access channel of a local data source, CDM cannot connect to the data source using the EIP.

Creating an MRS Link to HDFS

  1. On the Cluster Management page, click Job Management in the Operation column of the cluster. On the page that is displayed, click the Links tab then Create Link. On the Select Connector page that is displayed, select MRS HDFS for Hadoop, and click Next to set MRS HDFS link parameters.

    • Name: Enter a custom link name, for example, mrs_hdfs_link.
    • Manager IP: IP address of MRS Manager. Click Select next to the Manager IP text box to select a created MRS cluster. CDM automatically fills in the authentication information.
    • Username: If KERBEROS is used for authentication, the username and password for logging in to MRS Manager is required.

      If you need to create a snapshot when exporting a directory from HDFS, the user configured here must have the administrator permission on HDFS.

    • Password: password for logging in to MRS Manager
    • Authentication Method: authentication method for accessing MRS
    • Run Mode: Select the running mode of the HDFS link.

Creating an OBS Link

  1. On the Cluster Management page, click Job Management in the Operation column of the cluster. On the page that is displayed, click the Links tab then Create Link. In the displayed dialog box, select OBS for Connector, and click Next to set OBS link parameters. See Figure 2.

    • Name: Enter a custom link name, for example, obslink.
    • OBS Endpoint and Port: Enter the actual OBS address information.
    • OBS Bucket Type: Use the default option.
    • AK and SK: Enter the AK and SK used for logging in to OBS.
    Figure 2 Creating an OBS link

  2. Click Save. The Links page is displayed.

Creating a Migration Job

  1. On the Cluster Management page, click Job Management in the Operation column of the cluster. On the page that is displayed, click the Table/File Migration tab then Create Job to create a job for exporting data from MRS HDFS to OBS.

    Figure 3 Creating a job for migrating data from MRS HDFS to OBS
    • Job Name: Enter a unique name.
    • Source Job Configuration
      • Source Link Name: Select the hdfs_link created in Creating an MRS Link to HDFS.
      • Source Directory/File: Enter the directory or file path of the data to be migrated.
      • File Format: Select the file format used for data transmission. Select Binary. If files are transferred without being parsed, the file format does not have to be Binary. This applies to file copy.
      • Retain the default values of other optional parameters. For details, see From HDFS.
    • Destination Job Configuration
      • Destination Link Name: Select the obs_link created in Creating an OBS Link.
      • Bucket Name: Select the bucket from which the data will be migrated.
      • Write Directory: Enter the directory to which data is to be written on the OBS server.
      • File Format: Select Binary.
      • Retain the default values of the optional parameters in Show Advanced Attributes. For details, see To OBS.

  2. Click Next. The Map Field page is displayed. CDM automatically matches the source and destination fields.

    • If the field mapping is incorrect, you can drag the fields to adjust the mapping.
    • CDM expressions have built-in ability to convert fields of common strings, dates, and numbers. For details, see Field Conversion.

  3. Click Next to set task parameters. Typically, retain the default values for all parameters.

    In this step, you can configure the following optional functions:
    • Retry Upon Failure: If the job fails to be executed, you can determine whether to automatically retry. Retain the default value Never.
    • Group: Select the group to which the job belongs. The default group is DEFAULT. On the Job Management page, jobs can be displayed, started, or exported by group.
    • Scheduled Execution: For details about how to configure scheduled execution, see Scheduling Job Execution. Retain the default value. The default value is No.
    • Concurrent Extractors: Enter the number of extractors to be concurrently executed. CDM supports concurrent extraction of multiple files. Increasing the value of this parameter can improve migration efficiency.
    • Write Dirty Data: Select No. The file-to-file migration is binary, and no dirty data will be generated.
    • Delete Job After Completion: Retain the default value Do not delete. You can also set this parameter to Delete to prevent an accumulation of too many migration jobs.

  4. Click Save and Run. The Job Management page is displayed, on which you can view the job execution progress and result.
  5. After the job is successfully executed, in the Operation column of the job, click Historical Record to view the job's historical execution records and read/write statistics.

    On the Historical Record page, click Log to view the job logs.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback