Add an HBase data source to a Lindorm Tunnel Service (LTS) instance to migrate or synchronize data from HBase to Lindorm.
Choose your method
Select the method based on your cluster type and network topology:
| Cluster type | Network | Method |
|---|---|---|
| ApsaraDB for HBase Standard Edition | Same VPC as LTS | Use the Lindorm console |
| ApsaraDB for HBase Standard Edition | Different VPC from LTS | Use the LTS web UI |
| ApsaraDB for HBase Performance-enhanced Edition | Same VPC as LTS | Use the Lindorm console |
| ApsaraDB for HBase Performance-enhanced Edition | Different VPC from LTS | Add a LindormTable data source |
| Self-managed HBase cluster | Any | Use the LTS web UI |
| E-MapReduce (EMR) HBase cluster | Any | Use the LTS web UI |
Use the Lindorm console to add an HBase data source
Use this method when your ApsaraDB for HBase cluster and LTS instance are in the same virtual private cloud (VPC).
Prerequisites
Before you begin, ensure that you have:
An LTS instance
An ApsaraDB for HBase Standard Edition or Performance-enhanced Edition cluster in the same VPC as the LTS instance
Steps
Log on to the Lindorm console.
On the Instances page, click the ID of an LTS instance.
In the left-side navigation pane, click Data Sources.
On the HBase Data Source tab, click Add Data Source.
In the Add Data Source dialog box, configure the following parameters.
Parameter Required Description Instance Type Yes Select HBase Enhanced Edition or ApsaraDB for HBase Standard Edition. Region Yes Select the region where the data source cluster is deployed. Instance ID Yes Select the ID of the data source cluster. The cluster must be in the same VPC as the LTS instance. Click OK.
The data source is added when its status changes to Associated.
Use the LTS web UI to add an HBase data source
Use this method for self-managed HBase clusters, EMR HBase clusters, or ApsaraDB for HBase clusters in a different VPC from your LTS instance.
Prerequisites
Before you begin, ensure that you have:
An activated LTS instance with access to the LTS web UI. For setup instructions, see Purchase the LTS service and log on to the LTS web UI.
The ZooKeeper node addresses, ZooKeeper port, and HDFS connection URL of the HBase cluster
For self-managed or EMR HBase clusters: the
/etc/hostsfile of the HBase cluster
Steps
In the left-side navigation pane of the LTS web UI, choose Data Source Manage > Add Data Source.
On the Add data source page, configure the following parameters.
Parameter Required Description Name Yes A name for the HBase data source. Data Source Type Yes The version of the HBase data source. Select one of the following values: HBase1x(ApsaraDB for HBase V1.0),HBase2x(ApsaraDB for HBase V2.0),HBase098(self-managed HBase V0.98),HBase094(self-managed HBase V0.94).Parameters Yes The JSON configuration for connecting to the HBase data source. See Configure the Parameters field. Cluster/etc/hosts Only for EMR or self-managed clusters The /etc/hostsfile of the HBase cluster, which maps hostnames to IP addresses for each node.Click Add.
Configure the Parameters field
Paste the following JSON template into the Parameters field and replace the placeholder values.
{
"clusterKey": "<zk-host-1>,<zk-host-2>,<zk-host-3>:2181:/hbase",
"hbaseDir": "/hbase",
"hdfsUri": "hdfs://<namenode-1>:8020,<namenode-2>:8020"
}| Parameter | Required | Description |
|---|---|---|
clusterKey | Yes | The ZooKeeper connection string, in the format <zk-host-1>,<zk-host-2>,<zk-host-3>:<port>:<znode-parent-path>. The <znode-parent-path> is the value of zookeeper.znode.parent in the HBase cluster configuration. Append the port number 2181 only to the last ZooKeeper host. |
hbaseDir | Yes | The HDFS path for the HBase data, which is the value of hbase.rootdir in the cluster configuration. Specify the lowest-level directory without the hdfs:// prefix. For example, if hbase.rootdir is hdfs://hbase/hbase, set hbaseDir to /hbase. |
hdfsUri | Yes | The HDFS connection URL. For a high-availability cluster: hdfs://<namenode-1>:8020,<namenode-2>:8020. For a single-node cluster: hdfs://<namenode>:8020. Use the fully qualified domain name for each NameNode, and append port 8020 to each NameNode address. |