Search code examples
javahadoophbase

Load data into Hbase


I need to load data in to Hbase using Mapreduce, How I need to start with Hbase, to integrate Hbase with Java do I need to use any jar file.

  1. What are the jar files Required For Hbase to integrate with MapReduce
  2. What are the APIs which I need to refer
  3. How to code in Java for MapReduce

Solution

  • To Access Hbase from java, use below code:

    conf = new HBaseConfiguration();        
    conf.set("hbase.zookeeper.quorum", "ip1,ip2,ip3");
    conf.addResource(new Path("/etc/hbase/conf/hbase-site.xml"));
    hbase = new HBaseAdmin(conf);