Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] How to get only latest value when running spatial query?

Adnan,

Most of what Chris said is correct and good advice.  I did want to offer some clarification, however, about the comment suggesting you could discard old versions "iff the feature ID remains the same":

My understanding from talking with various CCRI folks and through testing GeoMesa, is that re-using a feature ID is not sufficient when you want to overwrite old data.  GeoMesa uses Accumulo to index and uses a combination of the feature ID, geometry, and date in order to generate a unique accumulo row ID.  The consequence of this is that you cannot be assured that you will be overwriting a feature by invoking the FeatureStore.addFeatures() method unless your feature ID AND geometry AND date are the same as what they were when the feature was originally added to GeoMesa.  If you cannot be assured of keeping the feature ID AND geometry AND date the same, then they have recommended that the FeatureStore.modifyFeatures() method be used instead.  


-Beau


-----Original Message-----
From: geomesa-users-bounces@xxxxxxxxxxxxxxxx [mailto:geomesa-users-bounces@xxxxxxxxxxxxxxxx] On Behalf Of Chris Eichelberger
Sent: Wednesday, August 27, 2014 1:19 PM
To: Geomesa User discussions
Subject: Re: [geomesa-users] How to get only latest value when running spatial query?

Adnan,

It sounds as if you might be using the date-time field in your feature as a type of version indicator.  (Is that right?)  In that case, there may not be a good/easy way to make GeoMesa return what you want.  This makes some sense, as GeoMesa indexes the (location, date) pair for each entry, so even if the same feature were ingested twice, it would likely occur at two different places in the index.

Instead, you may want to consider either 1) updating old records when you get a new version, which will discard the old versions (iff the feature ID remains the same); 2) writing client-side code to differentiate among the various versions that come back.

I hope that helps; if not, please let us know.

Sincerely,
  -- Chris

On Wed, 2014-08-27 at 22:02 +0500, Adnan Yaqoob wrote:
> Hello,
> 
> 
> When running spatial query with Geomesa, Accumulo is returning 
> multiple temporal values, how can I configure Geomesa to return only 
> latest values.
> 
> 
> I am using Accumulo 1.6 and Geomesa 1.5.x/1.x. 
> 
> 
> Regards,
> Adnan Yaqoob
> _______________________________________________
> 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


_______________________________________________
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