OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Database

KV - V4.3.5
  • OBKV overview
  • Architecture
  • OBKV-Table
    • Introduction to OBKV-Table
      • Overview
      • OBKV-Table operation types
      • Core features of OBKV-Table
      • Differences between replace and insert_or_update
      • Supported value types
      • OBKV-Table data models
    • Use the OBKV-Table Java client
      • Java development guide for OBKV-Table
      • Prepare for development with OBKV-Table
      • Use the OBKV-Table Java client to connect to a cluster
      • Set client parameters
      • Supported client interfaces
      • Use the OBKV-Table Java client
    • Use the OBKV-Table GO client
      • Use the OBKV-Table Go client to connect to a cluster
      • Overview of the Go client
      • Individual API operations
      • Batch operations
      • About queries
      • Aggregation API
      • Filters
    • FAQ
  • OBKV-HBase
    • Overview
    • OBKV-HBase core features
    • Compatibility with HBase
    • Deployment
    • Application development with OBKV-HBase
      • Overview of OBKV-HBase application development
      • Data model
      • Data model design
      • Connect to a cluster using the OBKV-HBase client
      • Migrate HBase business code to OBKV-HBase
      • Data operation examples
      • Delete expired data
    • OBKV-HBase migration guide
    • OBKV-HBase management
      • Overview
      • High availability
      • Security and permissions
      • Monitoring metrics
    • Performance test
    • OBKV-HBase integrations
      • Flink
        • Synchronize data to OBKV-HBase by using Flink
    • Views
    • FAQ

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Database
  3. KV
  4. V4.3.5

Migrate HBase business code to OBKV-HBase

Last Updated:2026-09-04 10:25:15

Preparations
Migrate code
Add OBKV-HBase client dependencies
Set OBKV-HBase client connection parameters

OBKV-HBase is compatible with HBase 1.x and 2.x versions. This topic explains how to migrate your business code from the HBase client to the OBKV-HBase client by updating only the configuration files.

Preparations

If you have not performed schema migration using OceanBase Migration Service (OMS), and the corresponding tables from your original client code have not been created in OBServer, see Connect to the cluster using the OBKV-HBase Java client to create the required OBKV-HBase tables.

Migrate code

Add OBKV-HBase client dependencies

Add the OBKV-HBase client dependency to your project's pom.xml file. If you previously used HBase 1.x, select the matching OBKV-HBase 1.x.x version. If you used HBase 2.x, use the OBKV-HBase 2.x.x version.

 <dependencies>
    <dependency>
        <groupId>com.oceanbase</groupId>
        <artifactId>obkv-hbase-client</artifactId>
        <version>2.1.0</version>
    </dependency>
</dependencies>

Notice

  • Try to use the latest version of the jar package, as older versions may not support newer server releases.
  • The version number shown here may not be the latest. Check the [central repository](https://mvnrepository.com/artifact/com.oceanbase/obkv-hbase-client) for the most recent OBKV-HBase release and update the version number accordingly.

Set OBKV-HBase client connection parameters

In this step, you need to set the connection type to OHConnectionImpl in the OBKV-HBase client configuration file and add the relevant OBKV-HBase connection parameters:

  • If your current HBase client uses org.apache.hadoop.hbase.HBaseConfiguration, update the hbase-site.xml configuration file.
  • If your current HBase client uses org.apache.hadoop.conf.Configuration, update the core-site.xml configuration file.

Change the connection type

Change the HBase connection implementation to OHConnectionImpl. All connections created through ConnectionFactory will then use OHConnectionImpl.

<configuration>
    <property>
      <name>hbase.client.connection.impl</name>
      <value>com.alipay.oceanbase.hbase.util.OHConnectionImpl</value>
    </property>
</configuration>

Add OBKV-HBase client connection parameters

Next, add the OBKV-HBase connection parameters to initialize OHConnectionImpl. The following example uses the ODP mode (the parameters required for direct connection mode are different). For details about these parameters, see the sections "Cloud mode configuration (public cloud)" and "Direct connection mode configuration (on-premises deployment)" in Connect to the cluster using the OBKV-HBase client.

<configuration>
    <property>
        <name>hbase.oceanbase.fullUserName</name>
        <value>your user name</value>
    </property>
    <property>
        <name>hbase.oceanbase.password</name>
        <value>your user password</value>
    </property>
    <property>
        <name>hbase.oceanbase.odpAddr</name>
        <value>your odp addr</value>
    </property>
    <property>
        <name>hbase.oceanbase.odpPort</name>
        <value>3307</value>
    </property>
    <property>
        <name>hbase.oceanbase.odpMode</name>
        <value>true</value>
    </property>
    <property>
        <name>hbase.oceanbase.database</name>
        <value>your database</value>
    </property>
</configuration>

Previous topic

Connect to a cluster using the OBKV-HBase client
Last

Next topic

Data operation examples
Next
on this page
Preparations
Migrate code
Add OBKV-HBase client dependencies
Set OBKV-HBase client connection parameters