Selain SDK Tablestore dan Operasi API RESTful, Anda dapat menggunakan Tablestore HBase Client yang disediakan oleh Tablestore untuk mengakses Tablestore. Aplikasi Java yang mendukung operasi HBase sumber terbuka dapat menggunakan Tablestore HBase Client untuk mengakses Tablestore.
Versi yang didukung
Berdasarkan Tablestore SDK for Java V4.2.x atau yang lebih baru, Tablestore HBase Client mendukung operasi API HBase sumber terbuka versi V1.x.x (kompatibel dengan HBase V1.2.0) dan V2.x.x (kompatibel dengan HBase V2.5.10).
Memperoleh Tablestore HBase Client
Metode untuk memperoleh Tablestore HBase Client bervariasi berdasarkan versi API HBase yang kompatibel. Pilih versi Tablestore HBase Client sesuai dengan versi HBase Client.
Untuk menggunakan HBase Client V2.x.x, pilih Tablestore HBase Client V2.x.x.
Untuk menggunakan HBase Client V1.x.x, pilih Tablestore HBase Client V1.x.x.
Untuk menggunakan HBase Client V0.x.x, lihat Membuat Tablestore HBase Client kompatibel dengan versi HBase sebelum 1.0.
HBase Client V2.x.x
Peroleh Tablestore HBase Client melalui salah satu metode berikut:
Unduh proyek tablestore-hbase-client dari GitHub.
Maven
Tablestore HBase Client V2.0.12 bergantung pada HBase Client V2.5.10 dan Tablestore SDK for Java V5.17.4. Tambahkan dependensi berikut ke file pom.xml proyek Maven:
<dependencies> <dependency> <groupId>com.aliyun.openservices</groupId> <artifactId>tablestore-hbase-client</artifactId> <version>2.0.12</version> </dependency> </dependencies>Jika Anda ingin menggunakan versi lain dari HBase Client atau Tablestore SDK for Java, gunakan tag exclusion. Contoh berikut menggunakan HBase Client V2.5.0 dan Tablestore SDK for Java V5.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 V1.x.x
Peroleh Tablestore HBase Client melalui salah satu metode berikut:
Unduh proyek tablestore-hbase-client dari GitHub.
Maven
Tablestore HBase Client V1.2.0 bergantung pada HBase Client V1.2.0 dan Tablestore SDK for Java V4.2.1. Tambahkan dependensi berikut ke file pom.xml proyek Maven:
<dependencies> <dependency> <groupId>com.aliyun.openservices</groupId> <artifactId>tablestore-hbase-client</artifactId> <version>1.2.0</version> </dependency> </dependencies>Jika Anda ingin menggunakan versi lain dari HBase Client atau Tablestore SDK for Java, gunakan tag exclusion. Contoh berikut menggunakan HBase Client V1.2.1 dan Tablestore SDK for Java V4.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>
Catatan penggunaan
Setelah memigrasikan data dari HBase ke Tablestore, Anda tidak perlu lagi memperhatikan HBase Server saat menggunakan Tablestore HBase Client. Gunakan operasi yang disediakan oleh Tablestore HBase Client untuk melakukan operasi tabel atau data. Tablestore menyembunyikan detail infrastruktur seperti pemisahan tabel, Dump, Compact, dan Region Server. Fokus hanya pada penggunaan data.
Untuk informasi tentang cara membaca dan menulis data Tablestore menggunakan Tablestore HBase Client, lihat Memulai dengan Tablestore HBase Client.
Untuk informasi tentang cara melakukan operasi pada data Tablestore menggunakan Tablestore HBase Client, lihat Migrasi dari HBase Client ke Tablestore HBase Client.
Aturan penagihan
Saat menggunakan Tablestore HBase Client, Anda akan dikenakan biaya untuk menulis dan membaca data dari Tablestore serta penyimpanan data. Untuk informasi lebih lanjut, lihat Ikhtisar Penagihan.
Referensi
Tablestore dan HBase memiliki model data dan fitur serupa. Namun, Tablestore HBase Client dan API HBase asli memiliki perbedaan spesifik. Untuk informasi lebih lanjut, lihat Fitur yang Didukung oleh Tablestore HBase Client.