Example: run an application for the Apache Phoenix thick client

Checking the example of how to run a maven application for the Phoenix thick client gives you better understanding about how to run your own application for the Phoenix thick client.

The requiredKerberos option is set to true for the Phoenix thick client. This means that the application must be run for this client from a computer which:
  • Has internal network access to the public cloud in which the database is deployed
  • Can resolve the internal hostnames of the database
  • Can obtain a Kerberos ticket from the database's Kerberos Key Distribution Center (KDC)

One way to run an Apache Phoenix thick client application is to launch an edge node in your cloud provider which meets the above requirements.

  1. Use the JDBC URL from the describe-client-connectivity command to run the example.
    One method is to build on your local machine and copy the JAR files to the remote node:
    $ scp -r target ec2-user@my-ec2-bastion-host.us-west-2.compute.amazonaws.com:
    $ scp clientConfig.zip ec2-user@my-ec2-bastion-host.us-west-2.compute.amazonaws.com:
    $ ssh ec2-user@my-ec2-bastion-host.us-west-2.compute.amazonaws.com "sudo yum install -y java-1.8.0-openjdk"
  2. Ensure that you have a Kerberos ticket and run your application for the Phoenix thick client
     kinit username
    $ java -cp target/sql-libs/*:target/sql-exemplar-0.0.1-SNAPSHOT.jar:hbase-conf com.cloudera.odx.sql.Client "[***PHOENIX THICK JDBC URL***]"
    
  3. Run your application.