logo

Apache Phoenix is a SQL skin over HBase delivered as a client-embedded JDBC driver targeting low latency queries over HBase data. Visit the Apache Phoenix website here.

Building Apache Phoenix

Phoenix uses Maven (3.X) to build all its necessary resources.

Building from source

On first setup, you may need to run $ mvn install -DskipTests to install the local jars. This is a side-effect of multi-module maven projects

To re-generate the antlr based files:
$ mvn process-sources

To build the jars and the assembly tarball:
$ mvn package
and optionally, to just skip all the tests and build the jars:
$ mvn package -DskipTests

Note: javadocs are generated in target/apidocs

HBase version compatibility

As Phoenix uses limited public HBase APIs, which sometimes change even within a minor release, Phoenix may not build or work with older releases of HBase, or ones that were released after Phoenix, even within the same HBase minor release.

By default, Phoenix will be built for the latest supported HBase 2.x release. You can specify the targeted HBase minor release by setting the hbase.profile system property for maven.

You can also specify the exact HBase release to build Phoenix with by additionally setting the hbase.version system property.

  • mvn clean install will build the for the latest known supported HBase 2.x relese
  • mvn clean install -Dhbase.profile=2.1 will use the latest known supported HBase 2.1 release
  • mvn clean install -Dhbase.profile=2.1 -Dhbase.version=2.1.7 will build with HBase 2.1.7

Phoenix verifies the specified hbase.profile and hbase.version properties, and will reject combinations that are known not to work. You may disable this verification by adding -Denforcer.skip=true to the maven command line. (In case you are using an HBase package that modifies the canonical version number in a way that Phoenix cannot parse)

Note that the above reflects the intended behaviour for the 5.1 release. In the current development releases, we default to building with the old HBase 2.0.1 release.

Importing into eclipse

Use the m2e eclipse plugin and do Import->Maven Project and just pick the root ‘phoenix’ directory.

Running the tests

All tests
$ mvn clean test

Findbugs

Findbugs report is generated in /target/site
$ mvn site

Generate Apache Web Site

checkout https://svn.apache.org/repos/asf/phoenix
$ build.sh