-
Ensure Phoenix and Spark Installed In CDP Private Cloud Base
-
Configure Phoenix Spark Connector using Cloudera Manager
Login to gateway node and run following command to get the HBase version.
echo "HBase version"
hbase --version
HBase Version
2.4.6.7.2.14.0-133
Finally, update the HBase and Phoenix Connector versions in our Maven project/configuration.
<properties>
...
<hbase.version>2.4.6.7.2.14.0-133</hbase.version>
...
</properties>
$ mvn package
Run the Spark job example:
spark-submit --master local[2] --class com.cloudera.cod.examples.spark.SparkApp ./target/phoenix-spark-transactions-0.1.0.jar jdbc:phoenix:[***zookeeper_quorum***]:[***zookeeper_port***]:[***zookeeper_hbase_path***]