AnsweredAssumed Answered

Connecting to Hbase Tables from remote java application

Question asked by charanthota on Apr 5, 2016
Latest reply on Apr 6, 2016 by charanthota


I am trying to connect to remote Hbase Cluster (Installed on Google Compute Engine) from my Java Application (Desktop),  after facing few issues I came to know that I need to install Mapr Client and I followed and installed the client using 

"server\configure.bat -N -c -C -RM -HS"

by following this doc Setting Up the Client - MapR 5.0 Documentation -


Also added core-site.xml


I also updated my /etc/hosts to look like below master.c.mapr-training-1250.internal node1.c.mapr-training-1250.internal node2.c.mapr-training-1250.internal node3.c.mapr-training-1250.internal


And here is my cluster setup info


Service Name Service Ports



HBase Thrift

Hive Metastore

Hive Server 2

Hive WebHCat



YARN Node Manager


YARN Resource Manager


When I am trying to connect to my cluster using the below java code.


public static final String HBASE_CONFIGURATION_ZOOKEEPER_QUORUM                     = "hbase.zookeeper.quorum";
public static final String HBASE_CONFIGURATION_ZOOKEEPER_CLIENTPORT                 = "";
public static final String hbaseZookeeperQuorum = ",,";
public static final int hbaseZookeeperClientPort=5181;


Configuration conf = HBaseConfiguration.create();

    conf.set(HBASE_CONFIGURATION_ZOOKEEPER_QUORUM, hbaseZookeeperQuorum);

    conf.setInt(HBASE_CONFIGURATION_ZOOKEEPER_CLIENTPORT, hbaseZookeeperClientPort);

     Connection connection = ConnectionFactory.createConnection(conf);

        table = connection.getTable(TableName.valueOf(Bytes.toBytes(tableName)));


Now I am getting the following errors :


log4j:WARN No appenders could be found for logger (com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See for more info.

2016-04-05 19:29:31,7891 Some error on socket 1704

2016-04-05 19:29:31,7891 ERROR Client fs/client/fileclient/cc/ Thread: 11568 rpc err Cannot send after transport endpoint shutdown(108) 28.21 to, fid 2049.16.2, upd 0

2016-04-05 19:29:53,7915 Some error on socket 1708

2016-04-05 19:30:16,7944 Some error on socket 1708


Could you please help me know what else I need to do , to make my app talk to my cluster?

I am able to run the code inside cluster, but not able to run from my desktop