Connecting Hbase using Java

Connecting HBase using Java

Big Data World

To write a simple Java application with HBase APIs, you surely need hadoop and hbase installation on your machine.

The hbase with Java is done in below versions of Linux, Java, Hadoop and Hbase respectively.

UBUNTU 13.4

JAVA 1.7.0_25

HADOOP 1.1.2 [pseudo distributed setup]

HBASE-0.94.8

To administer HBase, create and drop tables, list and alter tables, use HBaseAdmin. Once created, table access is via an instance of HTable. You add content to a table a row at a time.

Step 1: Start HBase. Start Eclispe.

Step 2: Create a new Java Project (File -> New -> Java Project).

Step 3: Fill up the form. (Here project name = HbaseConnection) and click next.

Step 4: Select Libraries tag from it and click “Add External JARs”.

Step 5: Browse to the $HBASE_HOME directory. ($HBASE_HOME is the directory where you have installed Hbase).

Step 6: Select hbase-0.94.8.jar and click Ok…

View original post 624 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s