Reputation: 11
I am writing below code to save spark dataframe to phonenix:
phoenix_df.write.format("org.apache.phoenix.spark").mode(SaveMode.Overwrite).options(Map("table"->"TEST","zkUrl"->"defabc10d")).save()
using spark 1.6.0.
However, job is failing with below error:
java.lang.NoSuchMethodError: org.apache.hadoop.hbase.HTableDescriptor.setValue(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/hadoop/hbase/HTableDescriptor
Please provide some solution is anybody faced same issue?
Upvotes: 1
Views: 401
Reputation: 9067
Looks like your Phoenix connector was built against a specific version of the HBase client (e.g. V1.3), but the HBase client bundled in CDH is a different version (V1.2) and there are breaking API changes.
--jars
)--conf spark.yarn.user.classpath.first=true
Upvotes: 1