Skip to content

Commit

Permalink
Offline brokers were not showing up in any stats. An offline broker s…
Browse files Browse the repository at this point in the history
…hould show up as missing from ISRs from all the other leaders.
  • Loading branch information
James Cheng committed Dec 18, 2019
1 parent 89805ec commit b80f873
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion who_in_isr/who_in_isr.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
js = json.load(sys.stdin)

# add all brokers to the result dict
all_broker_ids = [ broker_info['id'] for broker_info in js['brokers']]
all_broker_ids = set()
for topic in js['topics']:
for partition_js in topic['partitions']:
replicas = set([ r['id'] for r in partition_js['replicas'] ])
all_broker_ids |= replicas
for broker_id in all_broker_ids:
results[broker_id] = {}
for replica_id in all_broker_ids:
Expand Down

0 comments on commit b80f873

Please sign in to comment.