Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Need Help in Investigation: Attribute Index doesn't work in GeoMesa HBase

Hi Amit,

I opened a ticket here: https://geomesa.atlassian.net/browse/GEOMESA-2733

The issue comes from not having a geometry or date attribute in your schema that will be used as a secondary key in the attribute index. At the moment the only work-around would be to add a geometry or date attribute in your schema.

Thanks,

Emilio

On 10/27/19 8:29 PM, Amit Srivastava wrote:
Hi Emilio,

Sorry for reaching out to you via email. I am stuck with Geomesa and need your help to unblock myself.

I tried to store some data in the Geomesa HBase cluster without a spatial index (attribute index). The table schema explained below. I was not able to query data with the attribute index (in this case the "nodeId" column).

The export command I used is: `geomesa-hbase export -c atlas -f OSMWayNodesTest3 -m 10 -q "nodeId='node1'"` and `geomesa-hbase export -c atlas -f OSMWayNodesTest3 -q "nodeId = 'node1'" --hints QUERY_INDEX=attr:8:nodeId`.

However I was able to get data if I enforced it to use ID index like `geomesa-hbase export -c atlas -f OSMWayNodesTest3 -q "nodeId = 'node1'" --hints QUERY_INDEX=id`. So the attribute index doesn't work here but the ID index does.

Can you please help me to find out the root cause? We are using Geomesa's 2.3.1 version using HBase.



Table Schema
INFO  Describing attributes of feature 'OSMWayNodesTest3'
wayId             | String
nodeId            | String (Attribute indexed)
serializerVersion | String
featurePayload    | String

User data:
  geomesa.ignore.dtg | true
  geomesa.indices    | id:4:3:,attr:8:3:nodeId


Data in the table
[hadoop@ip-10-0-17-152 ~]$ geomesa-hbase export -c atlas -f OSMWayNodesTest3 -m 2
id,wayId:String,nodeId:String,serializerVersion:String,featurePayload:String
64d9dc80973fa2e5174525c2bd8fc7f2,way2,node1,geojson,payload
8a87e576b1a1c03bc3d78caaef5b9fd0,way2,node2,geojson,payload
INFO  Feature export complete to standard out in 12825ms for 2 features

--

Regards,

Amit Kumar Srivastava



Back to the top