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

Support archive traces for ES storage #1197

Merged
merged 2 commits into from
Jan 22, 2019
Merged
Changes from 1 commit
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
Prev Previous commit
Change messages
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
  • Loading branch information
pavolloffay committed Jan 22, 2019
commit 9832befecf91c71cfbe54e3b5f1af7df5961d039
8 changes: 4 additions & 4 deletions plugin/storage/es/esRollover.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def main():

# TODO add rollover for main indices https://github.com/jaegertracing/jaeger/issues/1242
if not str2bool(os.getenv('ARCHIVE', 'false')):
print('Rollover for main indices is not supported at the moment')
print('Rollover for main indices is not supported')
sys.exit(1)

client = elasticsearch.Elasticsearch(sys.argv[2:])
Expand Down Expand Up @@ -73,7 +73,7 @@ def create_aliases(client, alias_name, archive_index_name):
ilo.filter_by_regex(kind='regex', value='^'+archive_index_name+'$')
alias = curator.Alias(client=client, name=alias_name)
for index in ilo.working_list():
print("Adding index {} to {} alias".format(index, alias_name))
print("Adding index {} to alias {}".format(index, alias_name))
alias.add(ilo)
alias.do_action()

Expand All @@ -89,7 +89,7 @@ def rollover(client, write_alias, read_alias, conditions):
ilo.filter_by_alias(aliases=[write_alias])
alias = curator.Alias(client=client, name=read_alias)
for index in ilo.working_list():
print("Adding index {} to {} alias".format(index, read_alias))
print("Adding index {} to alias {}".format(index, read_alias))
alias.add(ilo)
alias.do_action()

Expand All @@ -105,7 +105,7 @@ def read_alias_lookback(client, write_alias, read_alias, unit, unit_count):
ilo.filter_by_age(source='creation_date', direction='older', unit=unit, unit_count=unit_count)
empty_list(ilo, 'No indices to remove from alias {}'.format(read_alias))
for index in ilo.working_list():
print("Removing index {} from {} alias".format(index, read_alias))
print("Removing index {} from alias {}".format(index, read_alias))
alias = curator.Alias(client=client, name=read_alias)
alias.remove(ilo)
alias.do_action()
Expand Down