OceanBase
English日本語简体中文
ドキュメントホーム
製品
エコシステム
リリース

データベース

OceanBase CloudOceanBaseデータベース

データベース

OceanBase CloudOceanBaseデータベース
OceanBase CloudOceanBaseデータベース

OceanBaseデータベース

KV - V4.4.2
  • OBKVの概要
  • OBKVのアーキテクチャ
  • OBKV-Table
    • OBKV-Table概要
      • OBKV-Tableの概要
      • OBKV-Tableのコア機能
      • OBKV-Tableデプロイの概要
    • シンプルなKey-Valueストレージのクイックスタート(Java)
    • OBKV-Table Javaクライアントを使ったアプリケーション開発
      • OBKV-Table Java開発ガイド
      • OBKV-Table開発の準備
      • OBKV-Table Javaクライアントを使用してクラスタに接続する
      • OBKV-Table操作例
        • OBKV-Tableへのデータ書き込み
        • OBKV-Tableによるデータのクエリ
        • OBKV-Tableでのデータ更新
        • OBKV-Tableによるデータの削除
      • OBKV-Table Javaクライアントのパラメータ設定
    • OBKV-Table管理
      • OBKV-Table管理の概要
      • OBKV-Tableの高可用性
      • OBKV-Tableのセキュリティ権限
      • OBKV-Tableモニタリングメトリクス
    • OBKV-Tableリファレンス
      • OBKV-Tableのデータモデル
      • OBKV-Tableの操作タイプ
      • OBKV-Tableがサポートするデータ型
      • OBKV-Table全文インデックス
      • OBKV-Tableのグローバルインデックスの使用範囲と例
      • OBKV-Tableの期限切れデータ削除
      • OBKV-Tableのグループコミット
      • OBKV-Tableの弱い整合性読み取りと最寄りデータセンターからの読み取り
      • OBKV-Table関連ビュー
    • OBKV-Table よくある質問
  • OBKV-HBase
    • OBKV-HBaseの概要
    • OBKV-HBaseのコア機能
    • OBKV-HBaseのデプロイ
    • OBKV-HBaseによるアプリケーション開発
      • OBKV-HBase アプリケーション開発の概要
      • OBKV-HBase Javaクライアントを使用したクラスタへの接続
      • HBaseの業務コードをOBKV-HBaseに移行する
      • OBKV-HBase データ操作の例
    • OBKV-HBase 移行ガイド
    • OBKV-HBase管理
      • OBKV-HBase管理の概要
      • OBKV-HBaseの高可用性
      • OBKV-HBaseのセキュリティ権限
      • OBKV-HBaseモニタリングメトリクス
    • OBKV-HBaseクエリの最適化
    • OBKV-HBaseの性能テスト
    • OBKV-HBaseリファレンス
      • OBKV-HBaseデータモデル
      • OBKV-HBaseのデータスキーマ
      • HBaseとの互換インターフェース
      • HBaseと互換性のあるフィルター
      • OBKV-HBaseの自動パーティション分割
      • OBKV-HBaseにおける期限切れデータの削除
      • OBKV-HBaseの弱い整合性読み取りと最寄りデータセンターからの読み取り
      • OBKV-HBase関連ビュー
    • OBKV-HBaseエコシステム統合
      • Flink連携
        • Flinkコネクタを使用してOBKV-HBaseにデータを同期する
        • ネイティブFlinkによるOBKV-HBaseへのアクセス
      • HiveによるOBKV-HBaseへのアクセス
      • SparkによるOBKV-HBaseへのアクセス
  • OBKVリリースノート
    • OBKV Enterprise版

PDF をダウンロード

このページには現在中国語/日本語版がなく、英語版を表示しています。
ドキュメントフィードバック
  1. ドキュメントセンター
  2. OceanBaseデータベース
  3. KV
  4. V4.4.2

Migrate HBase business code to OBKV-HBase

最終更新: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>

次のトピック

OBKVの概要
次へ
このページの内容
Preparations
Migrate code
Add OBKV-HBase client dependencies
Set OBKV-HBase client connection parameters