Using Apache Phoenix

Apache Phoenix is an SQL layer on top of Apache HBase that enables you to run low latency SQL queries on HBase, a NoSQL data source. Phoenix is delivered as a client-embedded JDBC driver and uses native HBase APIs instead of MapReduce.

You can use standard JDBC clients, like SQuirreL, to connect to Phoenix and query HBase data or you can access Phoenix from SQLLine. SQLLine is a pure-Java console-based utility for connecting to relational databases and executing SQL commands. SQLLine is used as the shell for Phoenix.

When you issue a query to Phoenix, the Phoenix query engine transforms the query into one or more native HBase scans. The query engine executes the scans in parallel to produce regular JDBC result sets. During query execution, Phoenix uses the HBase API, HBase coprocessors, and custom filters to optimize query performance.

Installation Overview

To install Phoenix, download and extract the Phoenix archive file. Copy the required Phoenix JAR files to the classpath of each HBase region server and then restart the region servers. Copy the Phoenix client JAR file to classpath of the Phoenix client.

After you complete the installation steps, invoke SQLLine to run Phoenix. When you invoke SQLLine, you must indicate the Zookeeper node or Zookeeper quorum. You indicate the Zookeeper node or quorum to tell SQLLine which Phoenix cluster that you want to connect to.


  • Apache Phoenix version 3.0 requires HBase 0.94 or later.
  • Apache Phoenix version 4.0 requires HBase 0.98.1 or later.
Note: HBase Master and HBase RegionServer packages are prerequisites for installing and using Apache Phoenix on a MapR cluster. Make sure these packages are installed before following the procedure to install Phoenix. See Installing HBase for details.

For more information about Apache Phoenix, refer to the Apache Phoenix documentation: