-
Notifications
You must be signed in to change notification settings - Fork 80
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
Allow users to specify number of docs per index when creating workloads #291
Allow users to specify number of docs per index when creating workloads #291
Conversation
Also consider modifying the user interface to options of this sort: |
Signed-off-by: Ian Hoang <hoangia@amazon.com>
Signed-off-by: Ian Hoang <hoangia@amazon.com>
Signed-off-by: Ian Hoang <hoangia@amazon.com>
Signed-off-by: Ian Hoang <hoangia@amazon.com>
1e90e73
to
174da48
Compare
Signed-off-by: Ian Hoang <hoangia@amazon.com>
… of comma separated values that need to match --indices list Signed-off-by: Ian Hoang <hoangia@amazon.com>
Signed-off-by: Ian Hoang <hoangia@amazon.com>
dump_documents(client, index, get_doc_outpath(output_path, index, "-1k"), min(total_docs, 1000), " for test mode") | ||
dump_documents(client, index, docs_path, total_docs) | ||
return template_vars(index, docs_path, total_docs) | ||
dump_documents(client, index, get_doc_outpath(output_path, index, "-1k"), min(ndocs_to_extract, 1000), " for test mode") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, the doc count specified should not be respected for test mode -- it should always be min(1000, total_docs). Users generally don't know the internals of test mode and it is unlikely they intend to specify that value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meant to comment this in a difffernt issue.
Description
create-workload
currently fetches all documents from specified indices in--indices
. Users should have the option to specify a subset of documents if they do not want to use all of the documents. In this PR, OSB now supports running--total-docs
in conjunction with--indices
. It takes in a comma-separated list of document counts that correspond to the respective index in the list of indices in--indices
.See #289 for more details.
Issues Resolved
#289
Testing
Tested it with a few indices in private cluster. Tested the following cases:
See #289 for outputs and more details
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.