How to run async query?

classic Classic list List threaded Threaded
5 messages Options
pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

How to run async query?

asked by john smith

Using 1.0.2 community. How would you run an async query?

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Re: How to run async query?

commented by dmitriy setrakyan

John, the query is asynchronous by default as it returns the cursor to the user before the 1st result comes in (as far as I know). Is it not what you are observing?

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Re: How to run async query?

This post was updated on .
commented by john smith

I didn't know... I was expecting a future to be returned. Was just wondering how to integrate async query with async framework like vertex.io. Doing a getAll() so I assume that is blocking...

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Re: How to run async query?

commented by john smith

But I would rather run async with vertx.io rather then getAll()

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Re: How to run async query?

commented by dmitriy setrakyan

John, you can treat QueryCursor as a Future and QueryCursor.getAll() as Future.get().

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss