diff --git a/.pylintrc b/.pylintrc index f0f5b9c4d..9de56511a 100644 --- a/.pylintrc +++ b/.pylintrc @@ -177,8 +177,6 @@ disable=print-statement, R0916, R1707, R1722, - W0104, - W0105, W0106, W0107, W0201, diff --git a/esrally/mechanic/mechanic.py b/esrally/mechanic/mechanic.py index 52043c79b..c7c30cd46 100644 --- a/esrally/mechanic/mechanic.py +++ b/esrally/mechanic/mechanic.py @@ -439,12 +439,6 @@ def on_all_nodes_stopped(self): @thespian.actors.requireCapability('coordinator') class Dispatcher(actor.RallyActor): - def __init__(self): - super().__init__() - self.start_sender = None - self.pending = None - self.remotes = None - """This Actor receives a copy of the startmsg (with the computed hosts attached) and creates a NodeMechanicActor on each targeted remote host. It uses Thespian SystemRegistration to get @@ -456,6 +450,12 @@ def __init__(self): Dispatcher. """ + def __init__(self): + super().__init__() + self.start_sender = None + self.pending = None + self.remotes = None + @actor.no_retry("mechanic dispatcher") def receiveMsg_StartEngine(self, startmsg, sender): self.start_sender = sender diff --git a/esrally/metrics.py b/esrally/metrics.py index c360a3950..8f00de85f 100644 --- a/esrally/metrics.py +++ b/esrally/metrics.py @@ -238,10 +238,6 @@ class MetaInfoScope(Enum): """ Cluster level meta-information is valid for all nodes in the cluster (e.g. the benchmarked Elasticsearch version) """ - # host = 2 - """ - Host level meta-information is valid for all nodes on the same host (e.g. the OS name and version) - """ node = 3 """ Node level meta-information is valid for a single node (e.g. GC times) @@ -412,11 +408,11 @@ def flush(self, refresh=True): raise NotImplementedError("abstract method") def close(self): - self.logger.info("Closing metrics store.") """ Closes the metric store. Note that it is mandatory to close the metrics store when it is no longer needed as it only persists metrics on close (in order to avoid additional latency during the benchmark). """ + self.logger.info("Closing metrics store.") self.flush() self.clear_meta_info() self.opened = False diff --git a/esrally/utils/opts.py b/esrally/utils/opts.py index 614b07d19..41f1658f3 100644 --- a/esrally/utils/opts.py +++ b/esrally/utils/opts.py @@ -146,13 +146,13 @@ def __init__(self, argvalue): def parse_options(self): def normalize_to_dict(arg): - from elasticsearch.client import _normalize_hosts """ Return parsed comma separated host string as dict with "default" key. This is needed to support backwards compatible --target-hosts for single clusters that are not defined as a json string or file. """ + from elasticsearch.client import _normalize_hosts return {TargetHosts.DEFAULT: _normalize_hosts(arg)} self.parsed_options = to_dict(self.argvalue, default_parser=normalize_to_dict) diff --git a/tests/mechanic/supplier_test.py b/tests/mechanic/supplier_test.py index 096c6f9c1..473d4db15 100644 --- a/tests/mechanic/supplier_test.py +++ b/tests/mechanic/supplier_test.py @@ -857,6 +857,7 @@ def test_missing_url(self): "release.cache": "true" }, template_renderer=renderer) with self.assertRaises(exceptions.SystemSetupError) as ctx: + # pylint: disable=pointless-statement # noinspection PyStatementEffect repo.download_url self.assertEqual("Neither config key [miss.url] nor [jdk.unbundled.miss_url] is defined.", ctx.exception.args[0]) @@ -868,6 +869,7 @@ def test_missing_cache(self): "runtime.jdk.bundled": "false" }, template_renderer=renderer) with self.assertRaises(exceptions.SystemSetupError) as ctx: + # pylint: disable=pointless-statement # noinspection PyStatementEffect repo.cache self.assertEqual("Mandatory config key [release.cache] is undefined.", ctx.exception.args[0]) @@ -880,6 +882,7 @@ def test_invalid_cache_value(self): "release.cache": "Invalid" }, template_renderer=renderer) with self.assertRaises(exceptions.SystemSetupError) as ctx: + # pylint: disable=pointless-statement # noinspection PyStatementEffect repo.cache self.assertEqual("Value [Invalid] for config key [release.cache] is not a valid boolean value.", ctx.exception.args[0])