Before you create a data migration or synchronization task, you must configure the data sources. This topic describes how to create an HBase data source in OceanBase Migration Service (OMS) Community Edition.
Prerequisites
You have obtained the values of the following parameters required for creating an HBase data source.
Parameter Description hbase.zookeeper.quorum The connection endpoint of ZooKeeper. fs.default.name The endpoint of the Hadoop distributed file system (HDFS) for HBase in the format of hdfs://<ip>:<port>. For example,hdfs://xxx.xxx.xxx.1:29000.zookeeper.znode.parent The path to HBase ZooKeeper files. For example, /hbase.hbase.rootdir The root directory of the HBase HDFS. For example, hdfs://xxx.xxx.xxx.1:29000/habse.You have configured Kerberos in OMS Community Edition if you use Kerberos for security authentication of the HBase cluster. To configure Kerberos, perform the following steps:
Log in to the Kerberos server and copy the credentials to the container of OMS Community Edition.
# To set the password of the root user, log in to the container of OMS Community Edition and run the passwd command. scp -P 2023 /etc/krb5.conf root@<IP address of the container of OMS Community Edition>:/etc/ # Comment out renew_lifetime = 60480 in the krb5.conf file in the /etc directory.Copy the Kerberos keytab file to a directory in the container of OMS Community Edition and configure permissions on the file. In the following example, the file is stored in the
/home/dsdirectory:# The keytab file must contain the users specified by the oms.kerberos.principal parameter. scp -P 2023 xxx.keytab root @<IP address of the container of OMS Community Edition>:/home/ds/ chmod 777 /home/ds/xxx.keytabLog in to the container of OMS Community Edition and run the following command to restart the console:
supervisorctl restart oms_console
Procedure
Log in to the console of OMS Community Edition.
In the left-side navigation pane, click Data Source Management.
On the Data Source Management page, click New Data Source in the upper-right corner.
In the New Data Source dialog box, specify HBase for Data Source Type.
Configure the following parameters.
Parameter Description Data Source Identifier We recommend that you set it to a combination of digits and letters. It must not contain any spaces and cannot exceed 32 characters in length. Notice
The data source identifier must be globally unique in the system of OMS Community Edition.
Region Select the region where the data source resides from the drop-down list. The region is the value that you set for the cm_regionparameter when you deploy OMS Community Edition.Notice
- This parameter is displayed only when multiple regions are available.
- Make sure that the mappings between the data source and the region are consistent. Otherwise, the migration and synchronization performance can be poor.
Database Properties By default, the required database parameters are displayed. For more information, see the parameter description in the Prerequisites section. You can click Add to add and configure other parameters as needed. For information about parameters related to Kerberos authentication, see the following table. Config File (Optional) The configuration file of the source HBase cluster is named hbase-site.xml.Remarks (Optional) Additional information about the data source. If you have configured Kerberos authentication for the selected HBase database, specify the following parameters in the Database Properties section.
Parameter Description hbase.security.authentication Set this parameter to kerberos, which specifies that the HBase cluster uses Kerberos for security authentication.hadoop.security.authentication Set this parameter to kerberos, which specifies that Hadoop-related services also use Kerberos for security authentication.hbase.master.kerberos.principal The Kerberos principal name of the master node of the HBase cluster in the format of primary/instance@REALM.primaryrepresents the service name, for example,hbase.instancecan be set to the IP address of the host, for example,xxx.xxx.xxx.1, or to_HOST, which indicates the dynamic IP address of the host.REALMrepresents a Kerberos realm, for example,EXAMPLE.COM.
hbase.regionserver.kerberos.principal The Kerberos principal name of the region server in the HBase cluster in the format of primary/instance@REALM.oms.kerberos.principal The Kerberos principal used for accessing OMS Community Edition. If you do not specify this parameter, the value of the hbase.master.kerberos.principalorhbase.regionserver.kerberos.principalparameter is used.oms.kerberos.keytab.file The storage path of the Kerberos keytab file in the container of OMS Community Edition, for example, /home/ds/xxx.keytab.
If you want to use Flink for a data migration task, the file must also be stored in the same location, such as/home/ds/xxx.keytab, on the Flink server.Click Test Connection to verify the network connection between OMS Community Edition and the data source.
After the test is passed, click OK.