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 #93

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
13 changes: 10 additions & 3 deletions pmc/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
"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,
"cluster-settings": {
"search.default_search_timeout": "{{default_search_timeout | default(-1)}}"
},
"schedule": [
{
"operation": {
"operation-type": "put-settings",
"body": {
"transient": {
"search.default_search_timeout": "{{default_search_timeout | default(-1)}}"
}
}
}
},
{
"operation": "delete-index"
},
Expand Down
10 changes: 10 additions & 0 deletions pmc/track.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
def put_settings(es, params):
es.cluster.put_settings(body=params["body"])


def register(registry):
# register a fallback for older Rally versions
try:
from esrally.driver.runner import PutSettings
except ImportError:
registry.register_runner("put-settings", put_settings)