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.
Phoenix uses Maven (3.X) to build all its necessary resources.
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
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 relesemvn clean install -Dhbase.profile=2.1
will use the latest known supported HBase 2.1 releasemvn 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.
Use the m2e eclipse plugin and do Import->Maven Project and just pick the root 'phoenix' directory.
All Unit Tests
$ mvn clean test
All Unit Tests and Integration tests
$ mvn clean verify
The verify maven target will also run dependency:analyze-only, which checks if the dependencies used in the code and declared in the maven projects match.
Findbugs report is generated in /target/site
$ mvn site
checkout https://svn.apache.org/repos/asf/phoenix
$ build.sh