Skip to content

Commit

Permalink
Remove operation type "index" (#453)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
danielmitterdorfer authored Apr 4, 2018
1 parent 24fea1d commit 7a0e577
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
8 changes: 8 additions & 0 deletions docs/migrate.rst
Original file line number Diff line number Diff line change
@@ -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
------------------------

Expand Down
3 changes: 1 addition & 2 deletions esrally/chart_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 0 additions & 4 deletions esrally/driver/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
4 changes: 0 additions & 4 deletions esrally/track/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 1 addition & 4 deletions esrally/track/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7a0e577

Please sign in to comment.