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:
- Open a terminal and navigate to the project’s resource directory
- Run the following: scp email@example.com/etc/hbase/conf/hbase-site.xml hbase-site.xml
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.