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

Remove operation type "index" #453

Merged
merged 2 commits into from
Apr 4, 2018
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
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