AnsweredAssumed Answered

Unable to connect to maprdb table through java api

Question asked by SanjeevSukumaran on Jun 22, 2016
Latest reply on Jun 22, 2016 by aaron



I am trying to access a mapr table using java client api.Below is the code.


package hbase;




import org.apache.hadoop.conf.Configuration;

import org.apache.hadoop.hbase.HBaseConfiguration;

import org.apache.hadoop.fs.Path;

import org.apache.hadoop.hbase.client.HTable;





import org.apache.hadoop.hbase.client.Result;

import org.apache.hadoop.hbase.client.ResultScanner;

import org.apache.hadoop.hbase.client.Scan;





public class GettingStarted


  public static void main(String[] args) throws IOException



   Configuration hconfig=HBaseConfiguration.create();



   hconfig.addResource(new Path("/opt/mapr/hbase/hbase-0.98.12/conf/hbase-site.xml"));



   HTable table = new HTable(hconfig, "/opt/mapr/env/user/demo");



   Scan scan = new Scan();

   ResultScanner scanner = table.getScanner(scan);


   for (Result result =; result != null; result =



       System.out.println("Found row : " + result);

       //closing the scanner







But i am unable to connect.

Is it compulsory to install mapr client to connect with remote hbase??


Kindly help me with the same.


Thanks and Regards

Sanjeev Sukumaran