The HBase Ganos API interacts with databases based on GeoTools interfaces. In GeoTools, DataStores are used to access and store data. A DataStore class is defined in the format of DataAccess<SimpleFeatureType,SimpleFeature>. SimpleFeature specifies a vector feature model managed by GeoTools. Each point, line, or polygon is considered a SimpleFeature. The schema of a SimpleFeature is defined by SimpleFeatureType.
For more information about the definition of the DataStore interface and how to use DataStores, see the official GeoTools documentation: http://docs.geotools.org/latest/userguide/library/api/datastore.html.
The HBase DataStore parameters are as follows. Parameters marked with asterisks (*) are required parameters.
Parameter | Data type | Description |
---|---|---|
hbase.catalog * | String | The name of the GeoMesa catalog. |
hbase.zookeepers* | String | The ZooKeeper endpoint. Multiple ZooKeeper endpoints are separated with commas (,). |
geomesa.query.timeout | String | The validity period of each query. |
geomesa.query.threads | Integer | The number of threads used to process each query. |
You can call the getDataStore method of DataStoreFinder to access a DataStore. Example:
//Configure connection parameters.
Map<String, String> params= new HashMap<>();
params.put("hbase.zookeepers","localhost");
params.put("hbase.catalog","catalog_name");
//Create a DataStore.
DataStore ds=DataStoreFactory.getDataStore(params);
You can then use the created HBase DataStore instance to interact with HBase Ganos. HBase DataStores are a subclass of DataStores.