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

Set cluster-settings via API #98

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions geonames/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@
"name": "append-no-conflicts",
"description": "Indexes the whole document corpus using Elasticsearch default settings. We only adjust the number of replicas as we benchmark a single node cluster and Rally will only start the benchmark if the cluster turns green. Document ids are unique so all index operations are append only. After that a couple of queries are run.",
"default": true,
"#COMMENT": "We set indices.query.bool.max_clause_count in order to allow to run the large_terms queries (default is 1024, we need more than 45.000)",
"cluster-settings": {
"indices.query.bool.max_clause_count": 50000
},
"schedule": [
{
"#COMMENT": "We set indices.query.bool.max_clause_count in order to allow to run the large_terms queries (default is 1024, we need more than 45.000)",
"operation": {
"operation-type": "put-settings",
"body": {
"transient": {
"indices.query.bool.max_clause_count": 50000
}
}
}
},
{
"operation": "delete-index"
},
Expand Down
9 changes: 9 additions & 0 deletions geonames/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,16 @@ def refresh(es, params):
es.indices.refresh(index=params.get("index", "_all"))


def put_settings(es, params):
es.cluster.put_settings(body=params["body"])


def register(registry):
registry.register_param_source("pure-terms-query-source", PureTermsQueryParamSource)
registry.register_param_source("filtered-terms-query-source", FilteredTermsQueryParamSource)
registry.register_param_source("prohibited-terms-query-source", ProhibitedTermsQueryParamSource)
# register a fallback for older Rally versions
try:
from esrally.driver.runner import PutSettings
except ImportError:
registry.register_runner("put-settings", put_settings)