我试图在没有空间索引的Geomesa HBase集群中存储一些数据。表架构如下。但是,我无法使用属性索引(在本例中为"nodeId"列(查询数据。我使用的导出命令是:geomesa-hbase export -c atlas -f OSMWayNodesTest3 -m 10 -q "nodeId='node1'"
和geomesa-hbase export -c atlas -f OSMWayNodesTest3 -q "nodeId = 'node1'" --hints QUERY_INDEX=attr:8:nodeId
。然而,如果我强制使用像geomesa-hbase export -c atlas -f OSMWayNodesTest3 -q "nodeId = 'node1'" --hints QUERY_INDEX=id
这样的ID索引,我就可以获得数据。所以属性索引在这里不起作用,但ID索引起作用。
表架构
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
表中的数据
[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
我在GeoMesa JIRA中创建了一个票证来跟踪问题。作为解决方案,如果架构中有日期或几何图形类型字段,它将正确返回查询。