Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geowave-dev] Geowave DataIdQuery Problem with Lists

Bill,
I looked at the code and for some reason it is very clearly setting the limit to 1 when running the DataIdQuery so what you are seeing is what I'd expect to happen (https://github.com/ngageoint/geowave/blob/master/extensions/datastores/accumulo/src/main/java/mil/nga/giat/geowave/datastore/accumulo/AccumuloDataStore.java#L434 and then lines 544-598).  I can't say I understand why it would be implemented this way, but it certainly looks to intentionally set a limit of 1 result for the DataIdQuery.  I will create an issue for this and try to understand the intent so that it acts as you would expect in our 0.9.2 release (targeted for end of June).  In the meantime, you can just query one data ID at a time.  I'd acknowledge the mechanics of your client code may seem a little more awkward than to be able to add all your data IDs to a single DataIDQuery, but for getting results by data ID we are not able to take advantage of a range scan anyways - it is always a single entry scan behind the scenes...so if its any consolation, in effect it should still be fairly similar behavior.

Thanks for pointing this out.  We'll make sure to get this resolved soon.
Rich

On Thu, May 26, 2016 at 5:59 PM, Rankin, Bill T (US) <bill.t.rankin@xxxxxxxxxxxxxx> wrote:
[resent b/c of initial bounce from list server]
----

Good evening GeoWave Developers,

I am trying to debug a problem with querying for features using DataIdQuery and  multiple feature IDs.  This is in GeoWave 0.9.0.1.

It appears that even when I specify multiple IDs, the query only returns the first feature rather than the full set.  Here is a quick code snippet to illustrate:

        List<ByteArrayId> nidList = new ArrayList<>();
        for (String nodeId : nodeIdList) {
            ByteArrayId nid = new ByteArrayId(nodeId);
            nidList.add(nid);
        }
        ByteArrayId daid = nodeDA.getAdapterId();
        DataIdQuery query = new DataIdQuery(daid, nidList);
        final CloseableIterator<SimpleFeature> iterator = geowaveDS.query(options, query);

        while (iterator.hasNext()) {
            SimpleFeature feature = iterator.next();
            NodeWritable node = new NodeWritable(feature);
            results.add(node);
        }

The query only seems to return the first feature from from the ID list.  I have verified that all features are in the datastore and can be queried for.

Has anyone else seen this issue and is there any workaround other than creating separate queries for each ID and manually cycling though them on the client side?

Thanks,

-bill

-- 
Bill Rankin, Ph.D.
Advanced GEOINT Systems (AGS)
BAE Systems, Inc.
bill.t.rankin@xxxxxxxxxxxxxx
919.794.8956 (w)



_______________________________________________
geowave-dev mailing list
geowave-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.locationtech.org/mailman/listinfo/geowave-dev



Back to the top