Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to partition the query to different physical partitions. #57

Closed
zhouchong90 opened this issue Aug 8, 2018 · 3 comments
Closed

How to partition the query to different physical partitions. #57

zhouchong90 opened this issue Aug 8, 2018 · 3 comments

Comments

@zhouchong90
Copy link

Hi,

I'm trying to execute a very large query that needs to return millions of records, so I want to partition the query and use multiple machines to process the results.

My logical partition key would be a UUID of a document, so that will not be very helpful for me to allocate different parts to each worker node. Can I get the physical partition ID and execute my query only within a particular physical partition?

Here's what I have tried:

FeedOptions feedOptions = new FeedOptions();
feedOptions.setEnableCrossPartitionQuery(false);
feedOptions.setPartitionKeyRangeIdInternal("0");

client.queryDocuments(collectionPath, "SELECT * FROM e where e.docType = 'address'", feedOptions)
.flatMapIterable(FeedResponse::getResults);

But changing the partitionKeyRangeId doesn't seem to change the results at all.

Please advise.

@moderakh
Copy link
Contributor

@zhouchong90 which version of the SDK are you using?

@zhouchong90
Copy link
Author

I'm currently using 1.0.0. Is there a new feature in the latest version that changes this?

@moderakh
Copy link
Contributor

@zhouchong90 you are on a very old version. We are doing active development and bugfixes and this issue has been fixed a while back. As of now the latest version is 2.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants