Amol Fasale
Amol Fasale

Reputation: 942

JDBC with HBase?

As I want to store data on HDFS, so need to access the HBase, so how could I connect to HBase using Java APIs.

Please suggest.

Thanks.

Upvotes: 2

Views: 1717

Answers (3)

sam
sam

Reputation: 1

Use HBase as source using using TableMapper class and store in hdfs

Upvotes: 0

user1589411
user1589411

Reputation: 41

I write a simple framework to operate on hbase. https://github.com/zhang-xzhi/simplehbase/

Simplehbase is a lightweight ORM framework between java app and hbase. The main feature of it are following:

  • data type mapping: mapping java type to hbase's bytes back and forth.
  • hbase operation wrapping: warpping hbase's put get scan operation to simple java interface.
  • hbase query language: using hbase filter, simplehbase can use sql-like style to operate on hbase.
  • dynamic query: like myibatis, simplehbase can use xml config file to define dynamic query to operate on hbase.
  • insert update support: provide insert, update on top of checkAndPut.
  • multiple version support: provide interface to operation on hbase's multiple version.
  • hbase batch operation support.
  • hbase native interface support.
  • HTablePool management.
  • HTable count and sum.

Upvotes: 0

user1261215
user1261215

Reputation:

HBase has Java API. Have a look at http://hbase.apache.org/apidocs/index.html

Two important classes are

1) HBaseAdmin
2) HTable

HBaseAdmin is admin API used to create/delete/alter tables
HTable is the client API used to put/get/scan records.

Upvotes: 2

Related Questions