15.3. Building Apache HBase

15.3.1. Basic Compile

Thanks to maven, building HBase is pretty easy. You can read about the various maven commands in Section 15.8, “Maven Build Commands”, but the simplest command to compile HBase from its java source code is:

mvn package -DskipTests
       

Or, to clean up before compiling:

mvn clean package -DskipTests
       

With Eclipse set up as explained above in Section 15.2.1, “Eclipse”, you can also simply use the build command in Eclipse. To create the full installable HBase package takes a little bit more work, so read on.

15.3.2. Building in snappy compression support

Pass -Dsnappy to trigger the snappy maven profile for building snappy native libs into hbase. See also Section C.5, “ SNAPPY ”

15.3.3. Building the HBase tarball

Do the following to build the HBase tarball. Passing the -Prelease will generate javadoc and run the RAT plugin to verify licenses on source.

% MAVEN_OPTS="-Xmx2g" mvn clean site install assembly:assembly -DskipTests -Prelease

15.3.4. Build Gotchas

If you see Unable to find resource 'VM_global_library.vm', ignore it. Its not an error. It is officially ugly though.

comments powered by Disqus