# 9.1. Installing GeoMesa HBase¶

## 9.1.1. Installing from the Binary Distribution¶

GeoMesa HBase artifacts are available for download or can be built from source. The easiest way to get started is to download the most recent binary version ($VERSION = 1.3.1) and untar it somewhere convenient: # download and unpackage the most recent distribution$ wget http://repo.locationtech.org/content/repositories/geomesa-releases/org/locationtech/geomesa/geomesa-hbase-dist_2.11/$VERSION/geomesa-hbase-dist_2.11-$VERSION-bin.tar.gz
$tar xvf geomesa-hbase-dist_2.11-$VERSION-bin.tar.gz
$cd geomesa-hbase-dist_2.11-$VERSION
$ls bin/ conf/ docs/ examples/ lib/ LICENSE.txt logs/  ## 9.1.2. Building from Source¶ GeoMesa HBase may also be built from source. For more information refer to Building from Source in the developer manual, or to the README.md file in the the source distribution. The remainder of the instructions in this chapter assume the use of the binary GeoMesa HBase distribution. If you have built from source, the distribution is created in the target directory of geomesa-hbase/geomesa-hbase-dist. More information about developing with GeoMesa may be found in the Developer Manual. ## 9.1.3. Setting up the HBase Command Line Tools¶ GeoMesa HBase comes with a set of command line tools for managing HBase features located in geomesa-hbase_2.11-$VERSION/bin/ of the binary distribution.

Note

You can configure environment variables and classpath settings in geomesa-hbase_2.11-$VERSION/conf/geomesa-env.sh. In the geomesa-hbase_2.11-$VERSION directory, run bin/geomesa-hbase configure to set up the tools.

$bin/geomesa-hbase configure Using GEOMESA_HBASE_HOME = /path/to/geomesa-hbase_2.11-1.3.0 Do you want to reset this? Y\n y Using GEOMESA_HBASE_HOME as set: /path/to/geomesa-hbase_2.11-1.3.0 Is this intentional? Y\n y To persist the configuration please edit conf/geomesa-env.sh or update your bashrc file to include: export GEOMESA_HBASE_HOME=/path/to/geomesa-hbase_2.11-1.3.0 export PATH=${GEOMESA_HBASE_HOME}/bin:$PATH  Update and re-source your ~/.bashrc file to include the $GEOMESA_HBASE_HOME and $PATH updates. Note geomesa-hbase will read the $HBASE_HOME and $HADOOP_HOME environment variables to load the appropriate JAR files for Hadoop and HBase. In addition, geomesa-hbase will pull any additional jars from the $GEOMESA_EXTRA_CLASSPATHS environment variable into the class path. Use the geomesa classpath command in order to see what JARs are being used.

Due to licensing restrictions, dependencies for shape file support must be separately installed. Do this with the following commands:

$bin/install-jai.sh$ bin/install-jline.sh


Run geomesa-hbase without arguments to confirm that the tools work.

$bin/geomesa-hbase Using GEOMESA_HBASE_HOME = /path/to/geomesa-hbase_2.11-1.3.0 INFO Usage: geomesa-hbase [command] [command options] Commands: ...  ## 9.1.4. Installing GeoMesa HBase in GeoServer¶ The HBase GeoServer plugin is bundled by default in a GeoMesa binary distribution. To install, extract $GEOMESA_HBASE_HOME/dist/gs-plugins/geomesa-hbase-gs-plugin_2.11-$VERSION-install.tar.gz into GeoServer’s WEB-INF/lib directory. Note that this plugin contains a shaded JAR with HBase 1.2.3 bundled. If you require a different version, modify the pom.xml and build the GeoMesa HBase plugin project from scratch with Maven. This distribution does not include the Hadoop or Zookeeper JARs; the following JARs should be copied from the lib directory of your HBase or Hadoop installations into GeoServer’s WEB-INF/lib directory: • hadoop-annotations-2.7.3.jar • hadoop-auth-2.7.3.jar • hadoop-common-2.7.3.jar • hadoop-mapreduce-client-core-2.7.3.jar • hadoop-yarn-api-2.7.3.jar • hadoop-yarn-common-2.7.3.jar • zookeeper-3.4.9.jar • commons-configuration-1.6.jar (Note the versions may vary depending on your installation.) You can use the bundled $GEOMESA_HBASE_HOME/bin/install-hadoop.sh script to install these JARs.

The HBase data store requires the configuration file hbase-site.xml to be on the classpath. This can be accomplished by placing the file in geoserver/WEB-INF/classes (you should make the directory if it doesn’t exist).

Restart GeoServer after the JARs are installed.