Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Executing a query - process

Okay,
when the featureId sets up the ranges to scan, I need to know the featureId depends on.
I know that you use an own implemenation for a SimpleFeatureType, but I can´t find the place where you determine the featureId from a given SimpleFeature. I assume that you override the getId() method. A featureID looks like this, which seems to have five parts (separated by "-"):
909271fc-44fa-495b-b876-5843df987fef
The composition of these values reflects the hierarchy of the index, isn´t it? (from coarse-grained to fine-grained) If not, how do you determine the featureID? What are these five parts?

Best regards,
Marcel Jacob.


Am 21.10.2015 18:26, schrieb Emilio Lahr-Vivaz:
Hi Marcel,

Executing a query is basically 3 steps:

1. Choose the best index to scan given the query
2. Set up the scan ranges, iterators, etc for the given index
3. Transform the results coming back from accumulo into SimpleFeatures

- We use a cost-based strategy for picking an index to scan. Right now it is fairly static, but we allow for user hints to indicate a preferred strategy. The code for calculating costs is here:
https://github.com/locationtech/geomesa/blob/master/geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/index/QueryStrategyDecider.scala

- We use the feature ID out of the index table in order to 'join' against the record table. You can see that code snippet here:
https://github.com/locationtech/geomesa/blob/master/geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/index/AttributeIdxStrategy.scala#L153-L154

- When scanning the records table, we only care about the Value - that is the serialized simple feature, including ID. The row of the record table has the feature ID in it, which is how we set up a range to scan.

Hope that helps,

Emilio

On 10/21/2015 11:59 AM, Marcel wrote:
Hello all,
I´m struggling how the process of executing a query is done on a theoretical level.
Could you explain how Geomesa executes this query (step by step)?
Following points would be very interesting:
- Is there an order for the tables? (maybe look first at attr_idx, then st_idx and finally full table scan if needed...something like this).
- What is returned from the index table? (for mapping with records table - maybe feature id?)
- What about the records table? (current structure of rowid - including feature id?)

Best regards,
Marcel Jacob.
_______________________________________________
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