GeoMesa Java API
If the current classpath contains the GeoMesa code, you can obtain the HBase datastore instance using a GeoTools API. To obtain the HBase datastore, classpath must contain hbase-site.xml, including HBase datastore connection parameters hbase.zookeeper.quorum and hbase.zookeeper.property.clientPort.
Map<String, Serializable> parameters = new HashMap<>();
parameters.put("bigtable.table.name", "geomesa");
org.geotools.data.DataStore dataStore =
org.geotools.data.DataStoreFinder.getDataStore(parameters); DataStore contains only one parameter.
- bigtable.table.name: Name of an HBase table for storing feature data.
For more information about Java APIs, see the GeoTools API and visit http://docs.geotools.org/stable/userguide/.
- LockingManager and Listener related APIs are not implemented due to GeoMesa lock management mechanism and other causes.
- In the current version, you are not advised to use the following APIs to modify the feature attribute.
FeatureStore.modifyFeatures(Name[], Object[], Filter) FeatureStore.modifyFeatures(AttributeDescriptor[], Object[], Filter) FeatureStore.modifyFeatures(Name, Object, Filter) FeatureStore.modifyFeatures(AttributeDescriptor, Object, Filter) SimpleFeatureStore.modifyFeatures(String, Object, Filter) SimpleFeatureStore.modifyFeatures(String[], Object[], Filter)
You can modify the feature attributes by searching for and insert a feature to overwrite the old one.
FeatureSource.getFeatures(Filter) FeatureStore.addFeatures(FeatureCollection<T, F>)
Last Article: Use Restrictions
Next Article: Change History
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.