15.7. HBase Index Configuration

GeoMesa exposes a variety of configuration options that can be used to customize and optimize a given installation. This section contains HBase-specific options; general options can be found under Index Configuration.

15.7.1. Setting File Compression

You can enable HBase file compression when creating a new SimpleFeatureType by setting the appropriate user data hints, or through the command line option. Valid compression types are snappy, lzo, gz, bzip2, lz4 or zstd.

SimpleFeatureType sft = ....;
sft.getUserData().put("geomesa.table.compression.type", "snappy");
geomesa-hbase create-schema --compression snappy ...

For more information on how to set schema options, see Setting Schema Options.

15.7.2. Feature Expiration

HBase supports setting a per-feature time-to-live. Expiration can be set in the SimpleFeatureType user data, using the key geomesa.feature.expiry. See Setting Schema Options for details on configuring the user data. Expiration can be set before calling createSchema, or can be added to an existing schema by calling updateSchema. However, note that if added through updateSchema, any existing features will not be expired.

Expiration can be based on either ingest time or a feature attribute. To set expiration based on ingest time, specify a time-to-live as a duration string, e.g. 24 hours or 180 days. To set expiration based on a feature attribute, specify the attribute along with a time-to-live in parentheses, e.g. dtg(24 hours) or event-time(30 days) (where dtg and event-time are Date-type attributes in the schema).

Feature expiration is based on HBase’s time-to-live functionality. See https://hbase.apache.org/book.html#ttl for details.