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

Compatibility with HBase

Last Updated: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!");
    }
}

Previous topic

OBKV-HBase core features
Last

Next topic

Deployment
Next
on this page
API compatibility
Differences in API usage