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

Compatibility with HBase

最終更新:2026-09-04 10:25:15

API compatibility
Differences in API usage

API compatibility

The OBKV-HBase client uses the functionality provided by the HTableInterface within the HBase system. The API compatibility is detailed as follows.

Modifier and type
Method and description
Compatibility
Result append (Append append) Appends values to one or more columns within a single row. Supported
Object[] batch(List<? extends Row> actions)
Same as batch(List, Object[]), but returns an array of results instead of using a results parameter reference.
Not supported
void batch(List<? extends Row> actions, Object[] results) Method that does a batch call on Deletes, Gets, Puts, Increments, Appends and RowMutations. Not supported
boolean checkAndDelete
(byte[] row, byte[] family, byte[] qualifier, byte[] value,Delete
 delete) Atomically checks if a row/family/qualifier value matches the expected value.
Supported
boolean checkAndPut
(byte[] row, byte[] family, byte[] qualifier, byte[] value, Put
put) Atomically checks if a row/family/qualifier value matches the expected value.
Supported
void close() Releases any resources help or pending changes in internal buffers. Supported
<T extends CoprocessorProtocol,R>Map<byte[],R> coprocessorExec(Class protocol, byte[] startKey, byte[] endKey, Batch.Call<T,R> callable) Invoke the passed Batch.Call against the CoprocessorProtocol instances running in the selected regions. Not supported
<T extends CoprocessorProtocol,R> void coprocessorExec(Class protocol, byte[] startKey, byte[] endKey, Batch.Call<T,R> callable, Batch.Callback callback) Invoke the passed Batch.Call against the CoprocessorProtocol instances running in the selected regions. Not supported
<T extends CoprocessorProtocol > T coprocessorProxy(Class protocol, byte[] row) Creates and returns a proxy to the CoprocessorProtocol instance running in the region containing the specified row. Not supported
void delete(Delete delete) Deletes the specified cells/row. Supported
void delete(List<Delete> deletes) Deletes the specified cells/rows in bulk. Supported
boolean exists(Get get) Test for the existence of columns in the table, as specified in the Get. Supported
void flushCommits() Executes all the buffered Put operations. Supported
Result get(Get get) Extracts certain cells from a given row. Supported
Result[] get(List<Get> gets) Extracts certain cells from the given rows, in batch. Supported
org.apache.hadoop.conf.Configuration getConfiguration() Returns the Returns the Configuration object used by this instance. Supported
Result getRowOrBefore(byte[] row, byte[] family) Deprecated. As of version 0.92 this method is deprecated without replacement. getRowOrBefore is used internally to find entries in .META. and makes various assumptions about the table (which are true for .META. but not in general) to be efficient. Deprecated
ResultScanner getScanner(byte[] family) Gets a scanner on the current table for the given family. Supported
ResultScanner getScanner(byte[] family, byte[] qualifier) Gets a scanner on the current table for the given family and qualifier. Supported
ResultScanner getScanner(Scan scan) Returns a scanner on the current table as specified by the Scan object. Supported
HTableDescriptor getTableDescriptor() Gets the table descriptor for this table. Not supported
byte[] getTableName() Gets the name of this table. Supported
long getWriteBufferSize() Returns the maximum size in bytes of the write buffer for this HTable. Supported
Result increment(Increment increment) Increments one or more columns within a single row. Supported
long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount) Atomically increments a column value. Supported
long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, Durability durability) Atomically increments a column value. Supported
boolean isAutoFlush() Tells whether or not 'auto-flush' is turned on. Supported
RowLock lockRow(byte[] row) RowLock and associated operations are deprecated Deprecated
void mutateRow(RowMutations rm) Performs multiple mutations atomically on a single row. Not supported
void put(List<Put> puts) Puts some data in the table, in batch. Supported
void put(Put put) Puts some data in the table. Supported
void setAutoFlush(boolean autoFlush) See setAutoFlush(boolean, boolean) Supported
void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) Turns 'auto-flush' on or off. Supported
void setWriteBufferSize(long writeBufferSize) Sets the size of the buffer in bytes. Supported
void unlockRow(RowLock rl) RowLock and associated operations are deprecated Deprecated

Differences in API usage

Due to architectural differences, some configuration code needs to be adjusted when migrating code from open-source HBase to OBKV-HBase.

The data access code for open-source HBase and OBKV-HBase remains unchanged, ensuring compatibility in the data access part. The main differences lie in:

  • Configuration: The architecture and configuration settings differ between open-source HBase and OBKV-HBase.
  • OHTableClient: Data access requires using the handle based on OBKV-HBase.

Below are some examples:

Open-source HBase code:

public class HBaseInsertDemo {
    public static void main(String[] args) throws Exception {
        // Configure HBase
        Configuration conf = HBaseConfiguration.create();
        conf.set("hbase.zookeeper.quorum", "your_zookeeper_quorum"); // Set ZooKeeper address
        conf.set("hbase.zookeeper.property.clientPort", "2181"); // Set ZooKeeper port
        //  Obtain The table handle
        TableName tableName = TableName.valueOf("your_table_name"); 
        HTable table =new HTable(tableName, conf);
        // Prepare to insert data
        Put put = new Put(Bytes.toBytes("row_key"));
        put.addColumn(Bytes.toBytes("cf"), Bytes.toBytes("qualifier"), Bytes.toBytes("value")); // Column family, column qualifier, value
        table.put(put);
        // Close resources
        table.close();
        System.out.println("Data inserted successfully!");
    }
}

OBKV-HBase code:

public class OBHBaseInsertDemo {
    public static void main(String[] args) throws Exception {
        // Configure HBase
        Configuration conf = new Configuration();
        conf.set(HBASE_OCEANBASE_FULL_USER_NAME, "");
        conf.set(HBASE_OCEANBASE_PASSWORD, "");
        conf.set(HBASE_OCEANBASE_PARAM_URL, "");
        conf.set(HBASE_OCEANBASE_SYS_USER_NAME, "");
        conf.set(HBASE_OCEANBASE_SYS_PASSWORD, "");
        // Obtain the table handle
        TableName tableName = TableName.valueOf("your_table_name"); 
        OHTableClient table = new OHTableClient(tableName, conf); // Create htable object

        // Prepare to insert data
        Put put = new Put(Bytes.toBytes("row_key"));
        put.addColumn(Bytes.toBytes("cf"), Bytes.toBytes("qualifier"), Bytes.toBytes("value")); // Column family, column qualifier, value
        table.put(put);
        // Close resources
        table.close();
        System.out.println("Data inserted successfully!");
    }
}

次のトピック

OBKVの概要
次へ
このページの内容
API compatibility
Differences in API usage