12.1. Installation¶
Note
The examples below expect a version to be set in the environment:
$ export TAG="5.0.1" $ export VERSION="2.12-${TAG}" # note: 2.12 is the Scala build version
12.1.1. Get the Processors¶
Note
There are GeoMesa NARs available for both Scala 2.12 and 2.13. Generally, this is only relevant if using custom GeoMesa converter modules written in Scala. Otherwise, either version can be used as long as all GeoMesa NARs in a given NiFi use the same Scala version.
The GeoMesa NiFi processors are available for download from GitHub.
Alternatively, you may build the processors from source. First, clone the project from GitHub. Pick a reasonable directory on your machine, and run:
$ git clone https://github.com/geomesa/geomesa-nifi.git
$ cd geomesa-nifi
To build the project, run:
$ mvn clean install
The nar contains bundled dependencies. To change the dependency versions, modify the version properties
(<hbase.version>
, etc) in the pom.xml
before building.
12.1.2. Install the Processors¶
To install the GeoMesa processors you will need to copy the NAR files into the lib
directory of your
NiFi installation. There two common NAR files, and seven datastore-specific NAR files.
Common NAR files:
geomesa-datastore-services-api-nar_$VERSION.nar
geomesa-datastore-services-nar_$VERSION_.nar
Datastore NAR files:
geomesa-hbase2-nar_$VERSION.nar
- HBase 2.5geomesa-accumulo20-nar_$VERSION.nar
- Accumulo 2.0geomesa-accumulo21-nar_$VERSION.nar
- Accumulo 2.1geomesa-gt-nar_$VERSION.nar
- PostGISgeomesa-kafka-nar_$VERSION.nar
Kafkageomesa-redis-nar_$VERSION.nar
Redisgeomesa-fs-nar_$VERSION.nar
Hadoopgeomesa-lambda-nar_$VERSION.nar
Kafka (lambda architecture)
The common NAR files are required for all datastores. The datastore-specific NARs can be installed as needed.
Note
There are two HBase and Accumulo NARs that correspond to different versions. Be sure to choose the appropriate NAR for your database.
If you downloaded the NARs from GitHub:
$ export NARS="geomesa-hbase2-nar geomesa-datastore-services-api-nar geomesa-datastore-services-nar"
$ for nar in $NARS; do wget "https://github.com/geomesa/geomesa-nifi/releases/download/geomesa-nifi-$TAG/$nar_$VERSION.nar"; done
$ mv *.nar $NIFI_HOME/extensions/
Or, to install the NARs after building from source:
$ export NARS="geomesa-hbase2-nar geomesa-datastore-services-api-nar geomesa-datastore-services-nar"
$ for nar in $NARS; do find . -name $nar_$VERSION.nar -exec cp {} $NIFI_HOME/extensions/ \;; done