4

I am not able to connect to HBase through Apache phoenix driver. Env info: hadoop-2.6.0.
hbase-0.98.9-hadoop2.
phoenix-4.1.0-server-hadoop2(Kept on all region servers).
phoenix-4.1.0-client-hadoop2(Using this jar to create a jdbc connection).


Java Client side , I am getting exception

Caused by: org.apache.phoenix.exception.PhoenixIOException: org.apache.hadoop.hbase.DoNotRetryIOException: java.io.IOException: Class org.apache.phoenix.coprocessor.MetaDataRegionObserver cannot be loaded at ...
Caused by: java.io.IOException: Class org.apache.phoenix.coprocessor.MetaDataRegionObserver cannot be loaded at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.testTableCoprocessorAttrs...


At HBase Master node logs I am getting this error:

2015-02-02 12:48:11,550 DEBUG [FifoRpcScheduler.handler1-thread-14] util.FSTableDescriptors: Exception during readTableDecriptor. Current table name = SYSTEM.CATALOG org.apache.hadoop.hbase.TableInfoMissingException: No table descriptor file under hdfs://HadoopNode:9000/home/hduser/Data/hbase/data/default/SYSTEM.CATALOG


Code which I am using to create phoenix connection:

String zkQuorum = "HbaseMasterNode:2222";

try
{
  Class.forName("org.apache.phoenix.jdbc.PhoenixDriver");
  String connectionURL = "jdbc:phoenix:" + zkQuorum;
  Connection connection = DriverManager.getConnection(connectionURL);
  System.out.println(connection);
}
catch (Exception e)
{
  throw new IllegalArgumentException("Create phoenix connection(" + zkQuorum + ") throw exception", e);
}

With the help of Basic Hbase java APIs I am able to connect but this issue I am facing only If I try to use Phoenix driver for HBase.

Abinash
  • 103
  • 11

0 Answers0