How to set communicate between Hbase with Java Libraries ?

0 votes

Hi,

Can anyone explain how to set communication between HBase and Java?

May 23 in Big Data Hadoop by pavitra
22 views

1 answer to this question.

0 votes

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.

answered May 23 by Gitika
• 25,420 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to set a custom install directory for a deb package with fpm

Here's something that you can try... the last ...READ MORE

answered Mar 26, 2018 in Big Data Hadoop by Amrinder
• 140 points
104 views
0 votes
1 answer

How to write a file in hdfs with Java?

You could pass the URI when getting ...READ MORE

answered Sep 26, 2018 in Big Data Hadoop by digger
• 26,600 points
259 views
0 votes
1 answer

How do I compile my java program on Ubuntu such that it will refer to hadoop-2.2.0 libraries?

The simplest solution for Linux machines would ...READ MORE

answered Oct 29, 2018 in Big Data Hadoop by Frankie
• 9,810 points
49 views
+1 vote
1 answer

How to read HDFS and local files with the same code in Java?

You can try something like this: ​ ...READ MORE

answered Nov 22, 2018 in Big Data Hadoop by Omkar
• 68,180 points
839 views
0 votes
1 answer
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,760 points
3,532 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
17,965 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,280 points
1,298 views
0 votes
1 answer

How to configure the metastore service to communicate with the MySQL database in Hive?

Hey, This step shows the configuration properties you ...READ MORE

answered May 29 in Big Data Hadoop by Gitika
• 25,420 points
53 views
0 votes
1 answer

How to set HBase configuration file to set the heap to 4 GB ?

Hey, The following lines in the hbase-env.sh file shows how ...READ MORE

answered May 31 in Big Data Hadoop by Gitika
• 25,420 points
34 views