Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

phoenix from spark

avatar

I am trying to access phoenix table from spark and have enabled pheonix namespace on the server. when i try to access using the phoenix client (sqlline.py), i am able to do without issue. But when i try to access usign spark-shell i get the foll0wing error.

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

Even i tried printing the classpath of spark-shell and i do see the hbase-site.xml in the classpath.

Spark Command: /usr/java/jdk1.8.0_60//bin/java -Dhdp.version=2.6.0.3-8 -cp /usr/hdp/current/phoenix-client/phoenix-4.8.1-HBase-1.1-client.jar:/etc/hbase/conf/hbase-site.xml:/usr/hdp/current/spark-client/conf/:/usr/hdp/current/spark-client/lib/spark-assembly-1.6.3.2.6.0.3-8-hadoop2.7.3.2.6.0.3-8.jar:/usr/hdp/current/spark-client/lib/datanucleus-api-jdo-3.2.6.jar:/usr/hdp/current/spark-client/lib/datanucleus-core-3.2.10.jar:/usr/hdp/current/spark-client/lib/datanucleus-rdbms-3.2.9.jar:/usr/hdp/current/hadoop-client/conf/:/usr/hdp/current/hadoop-client/lib/aws-java-sdk-s3-1.10.6.jar:/usr/hdp/current/hadoop-client/lib/aws-java-sdk-core-1.10.6.jar:/usr/hdp/current/hadoop-client/lib/aws-java-sdk-kms-1.10.6.jar -Dscala.usejavacp=true -Xms1g -Xmx1g org.apache.spark.deploy.SparkSubmit --class org.apache.spark.repl.Main --name Spark shell

What could be the issue. How do i pass the the phoenix namespace enabled parameter from spark-shell?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@ARUN

Can you try putting the correct "hbase-site.xml" in spark conf directory.

Also check if it is picking up the right file which has the mentioned property? Or incorrect file?

phoenix.schema.isNamespaceMappingEnabled

.

View solution in original post

3 REPLIES 3

avatar
Master Mentor

@ARUN

Can you try putting the correct "hbase-site.xml" in spark conf directory.

Also check if it is picking up the right file which has the mentioned property? Or incorrect file?

phoenix.schema.isNamespaceMappingEnabled

.

avatar

@Jay SenSharma

Thanks

It works fine now. But is there a way to do this setting in ambari. copying hbase-site.xml to more than 30 nodes is not the right way as there is a chance to miss.

avatar
Master Mentor

@ARUN

Good to know that the issue is resolved. I am not aware of any such operation from ambari side to paste the "hbase-site.xml" as it depends on customer's usecase. Like some customers might want to use spark but not HBase.