Connecting to PQS

The Phoenix Query Server (PQS) is a component of the Apache Phoenix distribution. PQS provides an alternative means to connect directly. The thin clients access the PQS using HTTP, and the PQS executes the statements for the thin clients, and returns the results. You can use the JDBC URL syntax to form the URL and connect to PQS.

This topology offloads most computation to PQS and requires a smaller client-side footprint. The PQS client protocol is based on the Avatica component of Apache Calcite.

To connect to the PQS directly, you must use the JDBC URL syntax as shown here: jdbc:phoenix:thin:[key=value[;key=value...]]

You must provide the correct URL, serialization, and authentication key-values to interact with the Phoenix Query Server.

Example URL

jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF; authentication=SPNEGO;principal=pqs@EXAMPLE.COM;keytab=/etc/security/keytabs/phoenix.keytab