AnsweredAssumed Answered

Accessing Hbase 1.1.1 in MapR 5.2 using Java hbase api

Question asked by sgudavalliR on Mar 27, 2017
Latest reply on Apr 10, 2017 by cathy

Hello, 

 

I have a java application where I am trying to access Hbase 1.1.1 on a MapR 5.2 

 

 

I am able to access the cluster and also create a Table in Hbase

But I am not able to put a record. 

 

here is my configuration and code for simple put :

 

config.set("hbase.zookeeper.quorum", "xxxxxxxxxxx59,xxxxxxxxxxx60,xxxxxxxxxxx61");
config.set("hbase.zookeeper.property.clientPort", "5181");
config.set("hbase.client.retries.number", Integer.toString(0));
config.set("zookeeper.znode.parent", "/hbase");
config.set("hbase.master", "xxxxxxxxxxx59:60000");
config.set("mapr.hbase.default", "hbase");
config.set("fs.defaultFS", "maprsfs://xxxxxxxxxxx59:7222/hbase");
config.set("fs.maprfs.impl", "com.mapr.fs.MapRFileSystem");
config.set("hbase.fsutil.maprfs.impl", "org.apache.hadoop.hbase.util.FSMapRUtils");

TableName tableName = TableName.valueOf("xxxx");

Table sds = connection.getTable(tableName);
Put put = new Put(Bytes.toBytes("1"));
put.addColumn(Bytes.toBytes("raw"), Bytes.toBytes("raw:data"), Bytes.toBytes("xyx"));
sds.put(put);

 

 

I am seeing following Error:

 

org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException: Failed 1 action: Unable to find region for 1 in datastore2 after 0 tries.: 1 time, 
     at org.apache.hadoop.hbase.client.AsyncProcess$BatchErrors.makeException(AsyncProcess.java:229)
     at org.apache.hadoop.hbase.client.AsyncProcess$BatchErrors.access$1700(AsyncProcess.java:209)
     at org.apache.hadoop.hbase.client.AsyncProcess.waitForAllPreviousOpsAndReset(AsyncProcess.java:1690)
     at org.apache.hadoop.hbase.client.BufferedMutatorImpl.backgroundFlushCommits(BufferedMutatorImpl.java:292)
     at org.apache.hadoop.hbase.client.BufferedMutatorImpl.flush(BufferedMutatorImpl.java:263)
     at org.apache.hadoop.hbase.client.HTable.flushCommits(HTable.java:1772)
     at org.apache.hadoop.hbase.client.HTable.put(HTable.java:1313)

 

Thanks for your help

 

Regards

Shiv

Outcomes