Yelp / kafka-utils

Apache License 2.0
314 stars 129 forks source link

AttributeError: 'int' object has no attribute 'leader' #211

Open aliayen opened 5 years ago

aliayen commented 5 years ago

I am trying to use corruption check with valid parameters:

kafka-corruption-check --cluster-type sample_type --cluster-name $MY_CLUSTER_NAME --data-path $KAFKA_LOGS_PATH --minutes 30

But get this error:

Filtering leaders Traceback (most recent call last): File "/opt/rh/python27/root/usr/bin/kafka-corruption-check", line 6, in run() File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/kafka_utils/kafka_corruption_check/main.py", line 535, in run args.end_time, File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/kafka_utils/kafka_corruption_check/main.py", line 447, in check_cluster broker_files = filter_leader_files(cluster_config, broker_files) File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/kafka_utils/kafka_corruption_check/main.py", line 395, in filter_leader_files leader_of = get_partition_leaders(cluster_config) File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/kafka_utils/kafka_corruption_check/main.py", line 364, in get_partition_leaders result[topic_partition] = p_data.leader

Baisang commented 4 years ago

@aliayen could you provide more information about what version of Kafka you are running?