Connecting to HDInsight HBase from an Azure VNet

I’ve been working with HBase on HDInsight for some time.  This is a series of tech notes I’ve accumulated over that time.  This tech note will talk about connecting to an HDInsight cluster with the native client.

If you are working with HBase on HDInsight you have a couple of different options when connecting to the database from a client application.  In this tech note I will discuss connecting to HBase directly using the native HBase API.  To do this, the application must be hosted in the same VNet as the HDInsight cluster.

The native method for accessing data is through HBase Client.  At the time of this writing, I’m currently targeting HDInsight 3.5 which requires Java 8.

HDInsight 3.5 Maven Dependencies

The following dependencies are required to connect to the HDInsight cluster.    In addition, I’m referencing a resource file abase-site.xml in the build section. I’ll discuss the file in the following section.

Include the HBase-Site.xml file

The hbase-site.xml file contains zookeeper hostnames required by the client to make a connection.  To grab the hbase-site.xml file from the cluster follow these steps:

  1. Open a terminal and navigate to the project’s resource directory
  2. Run the following: scp username@hdinsighthost-ssh.azurehdinsight.net/etc/hbase/conf/hbase-site.xml hbase-site.xml

Summary

The configuration discussed in this tech note will allow a client application to connect to a HDInsight HBase cluster provided it is deployed and executed from the same Azure VNet.

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