From 7a0e577136d44360d61b3b91a0dc00ecc659f016 Mon Sep 17 00:00:00 2001 From: Daniel Mitterdorfer Date: Wed, 4 Apr 2018 10:53:33 +0200 Subject: [PATCH] Remove operation type "index" (#453) With this commit we remove the operation type `index` that has been deprecated with Rally 0.8.0. It is replaced by the operation type `bulk` (which has also been introduced in the same release). Closes #435 Relates #453 Relates #369 --- docs/migrate.rst | 8 ++++++++ esrally/chart_generator.py | 3 +-- esrally/driver/runner.py | 4 ---- esrally/track/params.py | 4 ---- esrally/track/track.py | 5 +---- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/migrate.rst b/docs/migrate.rst index ad1d73a57..ca20aa810 100644 --- a/docs/migrate.rst +++ b/docs/migrate.rst @@ -1,6 +1,14 @@ Migration Guide =============== +Migrating to Rally 0.10.0 +------------------------- + +Removal of operation type ``index`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +We have removed the operation type ``index`` which has been deprecated with Rally 0.8.0. Please use ``bulk`` instead as operation type. + Migrating to Rally 0.9.0 ------------------------ diff --git a/esrally/chart_generator.py b/esrally/chart_generator.py index ed427bd0a..dac90c693 100644 --- a/esrally/chart_generator.py +++ b/esrally/chart_generator.py @@ -1185,8 +1185,7 @@ def tracks_for_index(): plugins = combination.get("plugins") for task in t.find_challenge_or_default(challenge).schedule: for sub_task in task: - # TODO: Remove "index" after some grace period - if sub_task.operation.type in [track.OperationType.Bulk.name, track.OperationType.Index.name]: + if sub_task.operation.type == track.OperationType.Bulk.name: cci.append((combination_name, combination_label, challenge, car, plugins, node_count, sub_task.name)) return t.name, cci diff --git a/esrally/driver/runner.py b/esrally/driver/runner.py index dfd973597..49badf3e8 100644 --- a/esrally/driver/runner.py +++ b/esrally/driver/runner.py @@ -808,10 +808,6 @@ def __repr__(self, *args, **kwargs): return "retryable %s" % repr(self.delegate) -# TODO #435: Remove this registration -# Old (deprecated) name -register_runner(track.OperationType.Index.name, BulkIndex()) -# New name register_runner(track.OperationType.Bulk.name, BulkIndex()) register_runner(track.OperationType.ForceMerge.name, ForceMerge()) register_runner(track.OperationType.IndicesStats.name, IndicesStats()) diff --git a/esrally/track/params.py b/esrally/track/params.py index c8b662c28..e98382537 100644 --- a/esrally/track/params.py +++ b/esrally/track/params.py @@ -825,10 +825,6 @@ def __exit__(self, exc_type, exc_val, exc_tb): return False -# TODO #435: Remove this registration. -# Old name - deprecated -register_param_source_for_operation(track.OperationType.Index, BulkIndexParamSource) -# New name register_param_source_for_operation(track.OperationType.Bulk, BulkIndexParamSource) register_param_source_for_operation(track.OperationType.Search, SearchParamSource) register_param_source_for_operation(track.OperationType.CreateIndex, CreateIndexParamSource) diff --git a/esrally/track/track.py b/esrally/track/track.py index cfd1ba0a8..46615f4f4 100644 --- a/esrally/track/track.py +++ b/esrally/track/track.py @@ -426,7 +426,6 @@ def __eq__(self, othr): @unique class OperationType(Enum): - Index = 0 # for the time being we are not considering this action as administrative IndicesStats = 1 NodesStats = 2 @@ -449,9 +448,7 @@ def admin_op(self): @classmethod def from_hyphenated_string(cls, v): - if v == "index": - return OperationType.Index - elif v == "force-merge": + if v == "force-merge": return OperationType.ForceMerge elif v == "index-stats": return OperationType.IndicesStats