Member since
03-22-2017
4
Posts
0
Kudos Received
0
Solutions
03-23-2017
07:42 AM
@Aditya Sharma
I have developed a very simple HBase Client code completely using maven so it would be easier for you to test and run. Please refer to the demo: https://github.com/jaysensharma/MiddlewareMagicDemos/tree/master/HDP_Ambari/HBase_Client Few changes you will need to make in the code. config.set("hbase.zookeeper.quorum", "erie3.example.com,erie1.example.com,erie4.example.com,erie2.example.com");
config.set("hbase.zookeeper.property.clientPort", "2181");
config.set("zookeeper.znode.parent", "/hbase-unsecure");
config.addResource(new Path("/PATH/TO/HBase_Client/src/main/resources/hbase-site.xml"));
config.addResource(new Path("/PATH/TO/HBase_Client/src/main/resources/core-site.xml"));
config.addResource(new Path("/PATH/TO/HBase_Client/src/main/resources/hdfs-site.xml"));
. Please use your own "hbase-site.xml","core-site.xml" and "hdfs-site.xml" files. . Then run it as following: How to build and run?
# cd /PATH/TO/HBase_Client
# mvn clean install exec:java
... View more