Connect to HBase Ganos

Updated at:

The HBase Ganos API performs database operations using GeoTools interfaces. The core data access modules are built around the GeoTools `DataStore` class, which is a type of `DataAccess`. In GeoTools, `SimpleFeature` represents the vector feature model, where each point, line, or polygon is a `SimpleFeature`. The structure of a `SimpleFeature` is defined by `SimpleFeatureType`.

For more information about the `DataStore` interface and how to use it, see the GeoTools documentation.

The following table describes the HBase `DataStore` parameters. An asterisk (*) indicates a required parameter.

Parameter

Type

Description

hbase.catalog *

String

The GeoMesa catalog table name.

hbase.zookeepers*

String

The Zookeeper addresses. Separate multiple addresses with commas (,).

geomesa.query.timeout

String

The timeout period for a query.

geomesa.query.threads

Integer

The number of threads used for each query.

You can obtain the `DataStore` using the `getDataStore` method of `DataStoreFinder`. The following is an example:

// Configure the connection parameters.
Map<String, String> params= new HashMap<>();
params.put("hbase.zookeepers","localhost");
params.put("hbase.catalog","catalog_name");

// Create the DataStore.
DataStore ds=DataStoreFactory.getDataStore(params);

This returns an `HBaseDataStore` instance for interacting with HBase Ganos. `HBaseDataStore` is a child class of `DataStore`.