Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Exception connecting to a hbase serverr with pheonix 4.7 installed, isNamespaceMappingEnabled problem

avatar
Contributor

Hi:

While I tried to connect to a hbase server with phoenix 4.7 installed using client with the same version,

I got the following exception:

java.sql.SQLException: ERROR 726 (43M10): Inconsistent namespace mapping properites

Cannot initiate connection as SYSTEM:CATALOG is found but client does not have phoenix.schema.isNamespaceMappingEnabled enabled

I checked the server and client, both sides are having the following options set to true in the hbase-site config:

phoenix.schema.isNamespaceMappingEnabled,

phoenix.schema.mapSystemTablesToNamespace

The attached are the traces and the config screenshots for HBase client and server . The platform is HDP 2.5 on both sides.

Trace1 is when using Pheonix jdbc driver directly, trace2 is using it through Spark

Any idea what I should do?

Thanks

Xindian

1 ACCEPTED SOLUTION

avatar

For trace 1 (if you are using sqlline.py).

can you check your <PHOENIX_HOME>/bin directory and remove if there is any hbase-site.xml and try.

If you are using any java program, you need to ensure hbase-site.xml in classpath or you are adding these properties while creating connection.

For trace 2 (spark job)

You need to include hbase-site.xml in the classpath of spark like this:-

you can add hbase-site.xml in spark conf directory of all nodes or add properties needed in spark-defaults.conf. 

OR(try)


spark.driver.extraClassPath= /usr/hdp/current/phoenix-client/phoenix-client-spark.jar:/etc/hbase/conf/hbase-site.xml 
spark.executor.extraClassPath= /usr/hdp/current/phoenix-client/phoenix-client-spark.jar:/etc/hbase/conf/hbase-site.xml

View solution in original post

12 REPLIES 12

avatar
Explorer

Hi all,

If you are using the DBCPConnectionPool in NiFi to connect to Phoenix and you are having the same issue, you must create a symlink of hbase-site.xml in the nar folder of the DBCP service.

ln -s /usr/hdp/current/hbase-master/conf/hbase-site.xml
/usr/nifi/work/nar/extensions/nifi-dbcp-service-nar-1.1.0.2.1.1.0-2.nar-unpacked/META-INF/bundled-dependencies/

avatar

Thanks @Gabriela Martinez for sharing, would you mind creating a separate question by tagging Phoenix and NIFI and answering and accepting the same, as it will benefit the other users who are using NIFI with Phoenix.

avatar

@X Long

I was facing same kind of issue. I have resolve this issue by using following steps:-

1) Edit Ambari->Hive->Configs->Advanced->Custom hive-site->Add Property..., add the following properties based on your HBase configurations(you can search in Ambari->HBase->Configs): custom hive-site.xml

hbase.zookeeper.quorum=xyz (find this property value from hbase )

zookeeper.znode.parent=/hbase-unsecure (find this property value from hbase )

phoenix.schema.mapSystemTablesToNamespace=true

phoenix.schema.isNamespaceMappingEnabled=true

2) Copy jar to /usr/hdp/current/hive-server2/auxlib from

/usr/hdp/2.5.6.0-40/phoenix/phoenix-4.7.0.2.5.6.0-40-hive.jar

/usr/hdp/2.5.6.0-40/phoenix/phoenix-hive-4.7.0.2.5.6.0-40-sources.jar If he jar is not working for you then just try to get following jar phoenix-hive-4.7.0.2.5.3.0-37.jar and copy this to /usr/hdp/current/hive-server2/auxlib

3) add property to custom-hive-env

HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-server2/auxlib/4) Add follwoing property to custom-hbase-site.xmlphoenix.schema.mapSystemTablesToNamespace=true phoenix.schema.isNamespaceMappingEnabled=true

5) Also run following command

1) jar uf /usr/hdp/current/hive-server2/auxlib/phoenix-4.7.0.2.5.6.0-40-client.jar /etc/hive/conf/hive-site.xml

2) jar uf /usr/hdp/current/hive-server2/auxlib/phoenix-4.7.0.2.5.6.0-40-client.jar /etc/hbase/conf/hbase-site.xml

And I hope my solution will work for you 🙂