Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geowave-dev] How to create DataAdapter instance

Try something like this:

https://github.com/ngageoint/geowave-benchmark/blob/master/src/main/java/mil/nga/giat/geowave/benchmark/FeatureCollectionDataAdapterBenchmark.java#L209


On Fri, Jul 24, 2015 at 2:03 PM, Rukshan Chathuranga <rcrukshan17@xxxxxxxxx> wrote:
Hi Whitney,

i create AdapterStore using following code. but it give me an exception.

AdapterStore s = (AdapterStore) new FeatureDataAdapter(createPointFeatureType());

protected static SimpleFeatureType createPointFeatureType() {

final SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
final AttributeTypeBuilder ab = new AttributeTypeBuilder();

builder.setName("Point");

builder.add(ab.binding(Geometry.class).nillable(false).buildDescriptor("geometry"));
builder.add(ab.binding(Date.class).nillable(true).buildDescriptor("TimeStamp"));
builder.add(ab.binding(Double.class).nillable(false).buildDescriptor("Latitude"));
builder.add(ab.binding(Double.class).nillable(false).buildDescriptor("Longitude"));
builder.add(ab.binding(String.class).nillable(true).buildDescriptor("TrajectoryID"));
builder.add(ab.binding(String.class).nillable(true).buildDescriptor("Comment"));

return builder.buildFeatureType();
}

Thanks and Regards.


Rukshan Chathuranga.
Department Of Computer Science & Engineering,
Faculty Of Engineering,
University Of Moratuwa. Sri Lanka.

On Thu, Jul 23, 2015 at 9:34 PM, Whitney O'Meara <james.w.omeara@xxxxxxxxx> wrote:
For your particular situation, you need to use AccumuloRowId on the entries that are returned by your scan.  Using this you can get the data adapter id for each particular entry that you're processing.  Using that data adapter id, you can recall the data adapter using AdapterStore

Make sense?

On Thu, Jul 23, 2015 at 11:23 AM, Rukshan Chathuranga <rcrukshan17@xxxxxxxxx> wrote:
Hi,

does any one know how to create DataAdapter instance for AccumuloUtils.decodeRow(key,value,adaptor,index)

Thanks and Regards.

Rukshan Chathuranga.
Department Of Computer Science & Engineering,
Faculty Of Engineering,
University Of Moratuwa. Sri Lanka.




Back to the top