Hey,
We can also communicate with HBase using Java libraries, but before accessing HBase using Java API you need to set classpath for those libraries.
Setting the classpath
Before proceeding with programming, set the classpath to HBase libraries in .
bashrc file. Open .
bashrc in any of the editors as shown below.
$ gedit ~/.bashrc
Set classpath for HBase libraries (lib folder in HBase) in it as shown below.
export CLASSPATH = $CLASSPATH://home/hadoop/hbase/lib/*
This is to prevent the “class not found” exception while accessing the HBase using Java API.