Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #838 from Parsely/bugfix/deprecate_zk_connect
Browse files Browse the repository at this point in the history
zookeeper_connect -> zookeeper_hosts in BalancedConsumer
  • Loading branch information
Emmett J. Butler committed Jul 19, 2018
2 parents 8cef16b + de05fcd commit 331fdb9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pykafka/balancedconsumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def __init__(self,
rebalance_max_retries=5,
rebalance_backoff_ms=2 * 1000,
zookeeper_connection_timeout_ms=6 * 1000,
zookeeper_connect='127.0.0.1:2181',
zookeeper_connect=None,
zookeeper_hosts='127.0.0.1:2181',
zookeeper=None,
auto_start=True,
reset_offset_on_start=False,
Expand Down Expand Up @@ -168,9 +169,13 @@ def __init__(self,
milliseconds) that the consumer waits while establishing a
connection to zookeeper.
:type zookeeper_connection_timeout_ms: int
:param zookeeper_connect: Comma-separated (ip1:port1,ip2:port2) strings
indicating the zookeeper nodes to which to connect.
:param zookeeper_connect: Deprecated::2.7,3.6 Comma-Separated
(ip1:port1,ip2:port2) strings indicating the zookeeper nodes to which
to connect.
:type zookeeper_connect: str
:param zookeeper_hosts: KazooClient-formatted string of ZooKeeper hosts to which
to connect.
:type zookeeper_hosts: str
:param zookeeper: A KazooClient connected to a Zookeeper instance.
If provided, `zookeeper_connect` is ignored.
:type zookeeper: :class:`kazoo.client.KazooClient`
Expand Down Expand Up @@ -241,7 +246,7 @@ def __init__(self,
self._offsets_commit_max_retries = valid_int(offsets_commit_max_retries,
allow_zero=True)
self._auto_offset_reset = auto_offset_reset
self._zookeeper_connect = zookeeper_connect
self._zookeeper_connect = zookeeper_connect or zookeeper_hosts
self._zookeeper_connection_timeout_ms = valid_int(zookeeper_connection_timeout_ms,
allow_zero=True)
self._reset_offset_on_start = reset_offset_on_start
Expand Down

0 comments on commit 331fdb9

Please sign in to comment.