In addition to Tablestore SDKs and RESTful API operations, you can use Tablestore HBase Client provided by Tablestore to access Tablestore. Java applications that support open source HBase operations can use Tablestore HBase Client to access Tablestore.
Supported versions
Based on Tablestore SDK for Java V4.2.x or later, Tablestore HBase Client supports open source HBase API operations of V1.x.x (compatible with HBase V1.2.0) and V2.x.x (compatible with HBase V2.5.10).
Obtain Tablestore HBase Client
The method that you can use to obtain Tablestore HBase Client varies based on the compatible HBase API version. HBase Client V2.x.x and HBase Client V1.x.x support different API operations. Select a Tablestore HBase Client version based on the version of HBase Client.
If you want to use HBase Client V2.x.x, select Tablestore HBase Client V2.x.x.
If you want to use HBase Client V1.x.x, select Tablestore HBase Client V1.x.x.
If you want to use HBase Client V0.x.x, see Make Tablestore HBase Client compatible with HBase versions earlier than 1.0.
HBase Client V2.x.x
Obtain Tablestore HBase Client by using one of the following methods:
Download the tablestore-hbase-client project from GitHub.
Download tablestore-hbase-client-2.0.12.zip.
Maven
Tablestore HBase Client V2.0.12 depends on HBase Client V2.5.10 and Tablestore SDK for Java V5.17.4. Add the following dependency to the pom.xml file of the Maven project:
<dependencies> <dependency> <groupId>com.aliyun.openservices</groupId> <artifactId>tablestore-hbase-client</artifactId> <version>2.0.12</version> </dependency> </dependencies>If you want to use other versions of HBase Client or Tablestore SDK for Java, you can use the exclusion tag. In the following example, HBase Client V2.5.0 and Tablestore SDK for Java V5.17.0 are used.
<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 V1.x.x
Obtain Tablestore HBase Client by using one of the following methods:
Download the tablestore-hbase-client project from GitHub.
Download tablestore-hbase-client-1.2.0.zip.
Maven
Tablestore HBase Client V1.2.0 depends on HBase Client V1.2.0 and Tablestore SDK for Java V4.2.1. Add the following dependency to the pom.xml file of the Maven project:
<dependencies> <dependency> <groupId>com.aliyun.openservices</groupId> <artifactId>tablestore-hbase-client</artifactId> <version>1.2.0</version> </dependency> </dependencies>If you want to use other versions of HBase Client or Tablestore SDK for Java, you can use the exclusion tag. In the following example, HBase Client V1.2.1 and Tablestore SDK for Java V4.2.0 are used.
<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>
Usage notes
After you migrate data from HBase to Tablestore, you do not need to care about HBase Server when you use Tablestore HBase Client. You need to only use operations provided by Tablestore HBase Client to perform table or data operations. Tablestore hides infrastructure details such as table splitting, Dump, Compact, and Region Server. You need to only pay attention to data usage.
For information about how to read and write Tablestore data by using Tablestore HBase Client, see Getting started with Tablestore HBase Client.
For information about how to perform operations on Tablestore data by using Tablestore HBase Client, see Migrate from HBase Client to Tablestore HBase Client.
Billing rules
When you use Tablestore HBase Client, you are charged for writing data to and reading data from Tablestore. You are also charged data storage fees. For more information, see Billing overview.
References
Tablestore and HBase have similar data models and features. However, Tablestore HBase Client and the native HBase API have specific differences. For more information, see Features supported by Tablestore HBase Client.