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

Change metrics store type from elasticsearch to opensearch #74

Merged
merged 1 commit into from
Nov 17, 2021
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
2 changes: 1 addition & 1 deletion it/resources/benchmark-os-it.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ opensearch.src.subdir = opensearch
local.dataset.cache = ${CONFIG_DIR}/benchmarks/data

[results_publishing]
datastore.type = elasticsearch
datastore.type = opensearch
datastore.host = localhost
datastore.port = 10200
datastore.secure = False
Expand Down
10 changes: 5 additions & 5 deletions osbenchmark/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def metrics_store(cfg, read_only=True, workload=None, test_procedure=None, provi


def metrics_store_class(cfg):
if cfg.opts("results_publishing", "datastore.type") == "elasticsearch":
if cfg.opts("results_publishing", "datastore.type") == "opensearch":
return OsMetricsStore
else:
return InMemoryMetricsStore
Expand Down Expand Up @@ -1004,7 +1004,7 @@ def to_externalizable(self, clear=False):
return None

def __str__(self):
return "Elasticsearch metrics store"
return "OpenSearch metrics store"


class InMemoryMetricsStore(MetricsStore):
Expand Down Expand Up @@ -1138,7 +1138,7 @@ def test_execution_store(cfg):
:return: A test_execution store implementation.
"""
logger = logging.getLogger(__name__)
if cfg.opts("results_publishing", "datastore.type") == "elasticsearch":
if cfg.opts("results_publishing", "datastore.type") == "opensearch":
logger.info("Creating OS test execution store")
return CompositeTestExecutionStore(EsTestExecutionStore(cfg), FileTestExecutionStore(cfg))
else:
Expand All @@ -1153,7 +1153,7 @@ def results_store(cfg):
:return: A test_execution store implementation.
"""
logger = logging.getLogger(__name__)
if cfg.opts("results_publishing", "datastore.type") == "elasticsearch":
if cfg.opts("results_publishing", "datastore.type") == "opensearch":
logger.info("Creating OS results store")
return OsResultsStore(cfg)
else:
Expand All @@ -1164,7 +1164,7 @@ def results_store(cfg):
def list_test_executions(cfg):
def format_dict(d):
if d:
items=sorted(d.items())
items = sorted(d.items())
return ", ".join(["%s=%s" % (k, v) for k, v in items])
else:
return None
Expand Down