Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] geomesa-kafka: how to create topics/featureName for Kafka DS

Hi James,

Sorry for the lack of documentation - we'll try to get something better together. In the meantime, hopefully this will help:

To get a feature name to show up in the kafka data store in geoserver, you have to create a schema using a kafka producer data store. This would usually happen outside of geoserver, in some other process. The following code snippet shows how you get a kakfa producer:

Map params = new HashMap();
params.put("brokers ", "my-kafka-brokers");
params.put("zookeepers", "my-zookeepers");
params.put("isProducer", true); // important - this specifies that you will be writing features

DataStore dataStore = org.geotools.data.DataStoreFinder.getDataStore(params);

SimpleFeatureType myType = org.locationtech.geomesa.utils.interop.SimpleFeatureTypes.createType("myType", "name:String,*geom:Point:srid=4326");
dataStore.createSchema(myType);

You should now be able to see the feature name in geoserver, assuming you use the same connection properties. In order to view live features, you will need to write them using the normal GeoTools API using the above producer dataStore. Let me know if you have any questions about that, but there are lots of example on the getools/geoserver sites.

One note: the kafka data store is meant for ephemeral features - if you restart geoserver you will lose any features you have already written.

Thanks,

Emilio

On 04/27/2015 11:28 AM, Ngo, James T. wrote:

Good morning,

 

I’m newbie to Geomesa and I’m attempting to use geomesa-kafka tool to create “featureName” on “Kafka Data Source” on GeoServer.

 

I was able to build and deploy geomesa-kafka-geoserver-plugin-accumulo1.5.1.0-rc-5-SNAPSHOT-geoserver-plugin-jar into GeoServer successfully.

 

From GeoServer UI, I can add a new data store as “Kafka Data Store”.  However, I don’t see any FeatureName is showed up to associate with Kafka DS to publish.

 

Since there is no documentation available on Geomesa-kafka, please provide us with more information how to publish FeatureName for each Kafka topic.

 

Thanks.

 

James Ngo

GD-MS

Senior Software Engineer

 

 



_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
http://www.locationtech.org/mailman/listinfo/geomesa-users


Back to the top