全部產品
Search
文件中心

Tablestore:Tablestore HBase Client介紹

更新時間:Feb 27, 2026

除了使用TablestoreSDK以及Restful API來訪問TablestoreTablestore還提供了Tablestore HBase Client。使用開源HBase API的Java應用可以通過Tablestore HBase Client來直接存取Tablestore服務。

適用版本

Tablestore HBase Client基於Tablestore4.2.x以上版本Java SDK實現,支援1.x.x版本(適配HBase 1.2.0)和2.x.x版本(適配HBase 2.5.10)的開源HBase API。

擷取方式

Tablestore HBase Client的擷取方式根據適配的HBase API版本不同存在差異。由於HBase Client 2.x.x與HBase Client 1.x.x版本存在介面變化,請根據要使用的HBase Client版本選擇Tablestore HBase Client版本。

  • 如需使用HBase Client 2.x.x版本,請使用Tablestore HBase Client 2.x.x版本。

  • 如需使用HBase Client 1.x.x版本,請使用Tablestore HBase Client 1.x.x版本。

  • 如需使用HBase Client 0.x.x版本,請參見如何相容HBase 1.0以前的版本

適配HBase Client 2.x.x版本

您可以通過如下方式擷取Tablestore HBase Client。

  • 從GitHub下載tablestore-hbase-client專案

  • 直接下載tablestore-hbase-client-2.0.12.zip

  • Maven

    Tablestore HBase Client 2.0.12版本依賴了HBase Client 2.5.10版本和Tablestore Java SDK 5.17.4版本。在Maven專案pom.xml檔案中加入如下依賴:

    <dependencies>
        <dependency>
            <groupId>com.aliyun.openservices</groupId>
            <artifactId>tablestore-hbase-client</artifactId>
            <version>2.0.12</version>
        </dependency>
    </dependencies>

    如果需要使用其它版本的HBase Client或Tablestore Java SDK,可以使用exclusion標籤。如下樣本中使用HBase Client 2.5.0版本和Tablestore Java SDK 5.17.0版本。

    <dependencies>
        <dependency>
            <groupId>com.aliyun.openservices</groupId>
            <artifactId>tablestore-hbase-client</artifactId>
            <version>2.0.12</version>
            <exclusions>
                <exclusion>
                    <groupId>com.aliyun.openservices</groupId>
                    <artifactId>tablestore</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hbase</groupId>
                    <artifactId>hbase-client</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.hbase</groupId>
            <artifactId>hbase-client</artifactId>
            <version>2.5.0</version>
        </dependency>
        <dependency>
            <groupId>com.aliyun.openservices</groupId>
            <artifactId>tablestore</artifactId>
            <classifier>jar-with-dependencies</classifier>
            <version>5.17.0</version>
        </dependency>
    </dependencies>			

適配HBase Client 1.x.x版本

您可以通過如下方式擷取Tablestore HBase Client。

  • 從GitHub下載tablestore-hbase-client專案

  • 直接下載tablestore-hbase-client-1.2.0.zip

  • Maven

    Tablestore HBase Client 1.2.0版本依賴了HBase Client 1.2.0版本和Tablestore Java SDK 4.2.1版本。在Maven專案pom.xml檔案中加入如下依賴:

    <dependencies>
        <dependency>
            <groupId>com.aliyun.openservices</groupId>
            <artifactId>tablestore-hbase-client</artifactId>
            <version>1.2.0</version>
        </dependency>
    </dependencies>   

    如果需要使用其他版本的HBase Client或Tablestore Java SDK,可以使用exclusion標籤。下面樣本中使用HBase Client 1.2.1版本和Tablestore Java SDK 4.2.0版本。

    <dependencies>
        <dependency>
            <groupId>com.aliyun.openservices</groupId>
            <artifactId>tablestore-hbase-client</artifactId>
            <version>1.2.0</version>
            <exclusions>
                <exclusion>
                    <groupId>com.aliyun.openservices</groupId>
                    <artifactId>tablestore</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hbase</groupId>
                    <artifactId>hbase-client</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.hbase</groupId>
            <artifactId>hbase-client</artifactId>
            <version>1.2.1</version>
        </dependency>
        <dependency>
            <groupId>com.aliyun.openservices</groupId>
            <artifactId>tablestore</artifactId>
            <classifier>jar-with-dependencies</classifier>
            <version>4.2.0</version>
        </dependency>
    </dependencies>			

使用說明

將HBase資料移轉到Tablestore後,使用Tablestore HBase Client時,您無需關心HBase Server的相關事項,只需要通過Client提供的介面進行表或資料操作即可。Tablestore為您屏蔽了資料表分裂、Dump、Compact、Region Server等底層相關的細節,您只需要關心資料的使用。

計費說明

通過Tablestore HBase Client讀寫資料時會產生資料寫入、資料讀取和資料存放區費用。更多資訊,請參見計費概述

相關文檔

雖然Tablestore與HBase在資料模型及功能上相近,Tablestore HBase Client與原生的HBase API仍然有一些區別。具體差異請參見Tablestore HBase Client支援的功能