19.2. Redis Data Store Parameters¶
Use the following parameters for a Redis data store (required parameters are marked with *
):
Parameter |
Type |
Description |
---|---|---|
|
String |
Redis connection URL. The URL can be used to specify the Redis database and credentials, if required - for example, ‘redis://user:pass@host:port/db’ |
|
String |
The name of the GeoMesa catalog table. In Redis, this is the base key used for inserts |
|
Integer |
Max number of simultaneous connections to use |
|
Boolean |
Test connections when borrowed from the pool. Connections may be closed due to inactivity, which would cause a transient error if validation is disabled |
|
String |
Timeout for socket connections to Redis. The timeout is specified as a duration,
e.g. |
|
Boolean |
Enable pipelining of query requests. This reduces network latency, but restricts queries to a single execution thread |
|
Integer |
The number of threads to use per query (if not pipelining) |
|
String |
The max time a query will be allowed to run before being killed. The
timeout is specified as a duration, e.g. |
|
Boolean |
Toggle collection of statistics for newly created feature types |
|
Boolean |
Audit queries being run. Queries will be written to a log file |
|
Boolean |
Use loose bounding boxes - queries will be faster but may return extraneous results |
|
String |
Comma-delimited superset of authorizations that will be used for queries |
|
Boolean |
Forces authorizations to be empty |
|
Boolean |
For partitioned schemas, execute scans in parallel instead of sequentially |
19.2.1. Creating a Data Store¶
An instance of a Redis data store can be obtained through the normal GeoTools discovery methods, assuming that the GeoMesa code is on the classpath.
Map<String, Serializable> parameters = new HashMap<>();
parameters.put("redis.url", "redis://localhost:6379");
parameters.put("redis.catalog", "geomesa");
org.geotools.api.data.DataStore dataStore =
org.geotools.api.data.DataStoreFinder.getDataStore(parameters);
More information on using GeoTools can be found in the GeoTools user guide.