File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -213,11 +213,13 @@ def __init__(self, **configs):
213
213
metric_group_prefix = 'admin' ,
214
214
** self .config
215
215
)
216
- self ._client .check_version (timeout = (self .config ['api_version_auto_timeout_ms' ] / 1000 ))
217
216
218
217
# Get auto-discovered version from client if necessary
219
218
if self .config ['api_version' ] is None :
220
219
self .config ['api_version' ] = self ._client .config ['api_version' ]
220
+ else :
221
+ # need to run check_version for get_api_versions()
222
+ self ._client .check_version (timeout = (self .config ['api_version_auto_timeout_ms' ] / 1000 ))
221
223
222
224
self ._closed = False
223
225
self ._refresh_controller_id ()
@@ -292,7 +294,7 @@ def _refresh_controller_id(self, timeout_ms=30000):
292
294
time .sleep (1 )
293
295
continue
294
296
# verify the controller is new enough to support our requests
295
- controller_version = self ._client .check_version (controller_id , timeout = (self .config ['api_version_auto_timeout_ms' ] / 1000 ))
297
+ controller_version = self ._client .check_version (node_id = controller_id , timeout = (self .config ['api_version_auto_timeout_ms' ] / 1000 ))
296
298
if controller_version < (0 , 10 , 0 ):
297
299
raise IncompatibleBrokerVersion (
298
300
"The controller appears to be running Kafka {}. KafkaAdminClient requires brokers >= 0.10.0.0."
You can’t perform that action at this time.
0 commit comments