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 HBase to MRS

Migrating Data from HBase to MRS

Updated on 2023-07-06 GMT+08:00

Scenario

This section describes how to migrate data from offline IDCs or public cloud HBase clusters to Huawei Cloud MRS. The data volume can be tens of TBs or less. This section uses Huawei Cloud CDM 2.9.1.200 as an example to describe how to migrate data.

Figure 1 HBase data migration

HBase stores data in HDFS, including HFile and WAL files. The hbase.rootdir configuration item specifies the HDFS path. By default, data is stored in the /hbase folder on MRS.

Some mechanisms and tool commands of HBase can also be used to migrate data. For example, you can migrate data by exporting snapshots, exporting/importing data, and CopyTable. For details, see the Apache official website.

This document describes how to migrate HBase data using Huawei Cloud CDM.

For details about the data sources supported by CDM, see Supported Data Sources. If the data source is Apache HBase, the recommended version is 2.1.X or 1.3.X. Before performing the migration, ensure that the data source supports migration.

Solution Advantages

Scenario-based migration migrates snapshots and then restores table data to speed up migration.

Impact on the System

Migrating large volumes of data has high requirements on network communication. When a migration task is executed, other services may be affected. You are advised to migrate data during off-peak hours.

Full Data Migration

  1. Log in to the CDM management console.
  2. Create a CDM cluster. The security group, VPC, and subnet of the CDM cluster must be the same as those of the destination cluster to ensure that the CDM cluster can communicate with the MRS cluster.
  3. On the Cluster Management page, locate the row containing the desired cluster and click Job Management in the Operation column.
  4. On the Links tab page, click Create Link.
  5. Create a link to the source cluster by referring to Creating a CDM Link. Select a connector type based on the actual cluster, for example, Apache HBase.

    NOTE:

    (Optional) Use a user with high permissions to migrate HBase. For example, click Show Advanced Attributes and add user hadoop.user.name = Username (for example, omm).

    Figure 2 Link to the source cluster

  6. On the Links tab page, click Create Link.
  7. Create a link to the destination cluster by referring to Creating a CDM Link. Select a connector type based on the actual cluster, for example, MRS HBase.

    NOTE:

    (Optional) Use a user with high permissions to migrate HBase. For example, click Show Advanced Attributes and add user hadoop.user.name = Username (for example, omm).

    Figure 3 Link to the destination cluster

  8. Choose Job Management and click the Table/File Migration tab. Then, click Create Job.
  9. In the job creation dialog box, configure the job name, source job parameters, and destination job parameters, select the data table to be migrated, and click Next.

    Figure 4 HBase job configuration

  10. Configure the mapping between the source fields and destination fields and click Next.
  11. On the task configuration page that is displayed, click Save without any modification.
  12. Choose Job Management and click Table/File Migration. Locate the row containing the job to run and click Run in the Operation column to start migrating HBase data.
  13. After the migration is complete, you can run the same query statement in the source and destination clusters to compare the query results.

    Example:

    • Query the number of records in the BTable table on the source and destination clusters to check whether the number of data records is the same. Add the --endtime parameter to eliminate the impact of data updates on the source cluster during the migration.

      Hbase org.apache.hadoop.hbase.mapreduce.RowCounter BTable --endtime=1587973835000

      Figure 5 Querying the number of records in the BTable table
    • Use scan ' BTable ', {TIMERANGE=>[1587973235000, 1587973835000]} of HBase shell to query data in a specified period for comparison.

Incremental Data Migration

If new data exists in the source cluster before the service cutover, you need to periodically migrate the new data to the destination cluster. Generally, the data volume updated every day is at the GB level. You can use the Entire DB migration function of CDM to migrate new HBase data every day.

If the Entire DB Migration function of CDM is used, the deleted data in the source HBase cluster cannot be synchronized to the destination cluster.

The HBase connector for scenario migration cannot be shared with that for entire database migration. Therefore, a new HBase connector is required.

  1. Repeat 1 to 7 in Full Data Migration to create two HBase connectors. Select MRS HBase and Apache HBase as the connector type for the source cluster and destination cluster, respectively.

    Figure 6 HBase incremental migration link

  2. Choose Job Management > Entire DB Migration, and click Create Job.
  3. On the job parameter configuration page, configure job parameters and click Next.

    • Job Name: Enter a user-defined job name, for example, hbase-increase.
    • Source Job Configuration: Set Source Link Name to the name of the link to the source cluster created in 1, and click Show Advanced Attributes to configure the time range for data migration.
    • Destination Job Configuration: Set Destination Link Name to the name of the link to the destination cluster created in 1. Leave other parameters blank.
    Figure 7 HBase incremental migration job configuration

  4. Select the data table to be migrated, click Next, and click Save.
  5. Choose Job Management > Entire DB Migration and click Run in the Operation column of the job to be executed to start HBase incremental data migration.

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