Skip to content

Commit 0a8884b

Browse files
authored
Add KAFKA 2.3.0 to test matrix (#1915)
1 parent 975087b commit 0a8884b

21 files changed

+975
-9
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ env:
1414
- KAFKA_VERSION=0.10.2.2
1515
- KAFKA_VERSION=0.11.0.3
1616
- KAFKA_VERSION=1.1.1
17+
- KAFKA_VERSION=2.3.0
1718

1819
addons:
1920
apt:

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Kafka Python client
22
------------------------
33

4-
.. image:: https://img.shields.io/badge/kafka-1.1%2C%201.0%2C%200.11%2C%200.10%2C%200.9%2C%200.8-brightgreen.svg
4+
.. image:: https://img.shields.io/badge/kafka-2.3%2C%202.2%2C%202.1%2C%202.0%2C%201.1%2C%201.0%2C%200.11%2C%200.10%2C%200.9%2C%200.8-brightgreen.svg
55
:target: https://kafka-python.readthedocs.io/compatibility.html
66
.. image:: https://img.shields.io/pypi/pyversions/kafka-python.svg
77
:target: https://pypi.python.org/pypi/kafka-python
@@ -150,7 +150,7 @@ for interacting with kafka brokers via the python repl. This is useful for
150150
testing, probing, and general experimentation. The protocol support is
151151
leveraged to enable a KafkaClient.check_version() method that
152152
probes a kafka broker and attempts to identify which version it is running
153-
(0.8.0 to 1.1+).
153+
(0.8.0 to 2.3+).
154154

155155
Low-level
156156
*********

docs/compatibility.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
Compatibility
22
-------------
33

4-
.. image:: https://img.shields.io/badge/kafka-1.1%2C%201.0%2C%200.11%2C%200.10%2C%200.9%2C%200.8-brightgreen.svg
4+
.. image:: https://img.shields.io/badge/kafka-2.3%2C%202.2%2C%202.1%2C%202.0%2C%201.1%2C%201.0%2C%200.11%2C%200.10%2C%200.9%2C%200.8-brightgreen.svg
55
:target: https://kafka-python.readthedocs.io/compatibility.html
66
.. image:: https://img.shields.io/pypi/pyversions/kafka-python.svg
77
:target: https://pypi.python.org/pypi/kafka-python
88

9-
kafka-python is compatible with (and tested against) broker versions 1.1
9+
kafka-python is compatible with (and tested against) broker versions 2.3
1010
through 0.8.0 . kafka-python is not compatible with the 0.8.2-beta release.
1111

1212
Because the kafka server protocol is backwards compatible, kafka-python is
13-
expected to work with newer broker releases as well (2.0+).
13+
expected to work with newer broker releases as well.
14+
15+
Although kafka-python is tested and expected to work on recent broker versions,
16+
not all features are supported. Specifically, authentication codecs, and
17+
transactional producer/consumer support are not fully implemented. PRs welcome!
1418

1519
kafka-python is tested on python 2.7, 3.4, 3.7, and pypy2.7.
1620

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
kafka-python
22
############
33

4-
.. image:: https://img.shields.io/badge/kafka-1.1%2C%201.0%2C%200.11%2C%200.10%2C%200.9%2C%200.8-brightgreen.svg
4+
.. image:: https://img.shields.io/badge/kafka-2.3%2C%202.2%2C%202.1%2C%202.0%2C%201.1%2C%201.0%2C%200.11%2C%200.10%2C%200.9%2C%200.8-brightgreen.svg
55
:target: https://kafka-python.readthedocs.io/compatibility.html
66
.. image:: https://img.shields.io/pypi/pyversions/kafka-python.svg
77
:target: https://pypi.python.org/pypi/kafka-python
@@ -136,7 +136,7 @@ for interacting with kafka brokers via the python repl. This is useful for
136136
testing, probing, and general experimentation. The protocol support is
137137
leveraged to enable a :meth:`~kafka.KafkaClient.check_version()`
138138
method that probes a kafka broker and
139-
attempts to identify which version it is running (0.8.0 to 1.1+).
139+
attempts to identify which version it is running (0.8.0 to 2.3+).
140140

141141

142142
Low-level
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
# see kafka.server.KafkaConfig for additional details and defaults
16+
17+
############################# Server Basics #############################
18+
19+
# The id of the broker. This must be set to a unique integer for each broker.
20+
broker.id={broker_id}
21+
22+
############################# Socket Server Settings #############################
23+
24+
listeners={transport}://{host}:{port}
25+
security.inter.broker.protocol={transport}
26+
27+
ssl.keystore.location={ssl_dir}/kafka.server.keystore.jks
28+
ssl.keystore.password=foobar
29+
ssl.key.password=foobar
30+
ssl.truststore.location={ssl_dir}/kafka.server.truststore.jks
31+
ssl.truststore.password=foobar
32+
33+
authorizer.class.name=kafka.security.auth.SimpleAclAuthorizer
34+
allow.everyone.if.no.acl.found=true
35+
36+
# The port the socket server listens on
37+
#port=9092
38+
39+
# Hostname the broker will bind to. If not set, the server will bind to all interfaces
40+
#host.name=localhost
41+
42+
# Hostname the broker will advertise to producers and consumers. If not set, it uses the
43+
# value for "host.name" if configured. Otherwise, it will use the value returned from
44+
# java.net.InetAddress.getCanonicalHostName().
45+
#advertised.host.name=<hostname routable by clients>
46+
47+
# The port to publish to ZooKeeper for clients to use. If this is not set,
48+
# it will publish the same port that the broker binds to.
49+
#advertised.port=<port accessible by clients>
50+
51+
# The number of threads handling network requests
52+
num.network.threads=3
53+
54+
# The number of threads doing disk I/O
55+
num.io.threads=8
56+
57+
# The send buffer (SO_SNDBUF) used by the socket server
58+
socket.send.buffer.bytes=102400
59+
60+
# The receive buffer (SO_RCVBUF) used by the socket server
61+
socket.receive.buffer.bytes=102400
62+
63+
# The maximum size of a request that the socket server will accept (protection against OOM)
64+
socket.request.max.bytes=104857600
65+
66+
67+
############################# Log Basics #############################
68+
69+
# A comma seperated list of directories under which to store log files
70+
log.dirs={tmp_dir}/data
71+
72+
# The default number of log partitions per topic. More partitions allow greater
73+
# parallelism for consumption, but this will also result in more files across
74+
# the brokers.
75+
num.partitions={partitions}
76+
default.replication.factor={replicas}
77+
78+
## Short Replica Lag -- Drops failed brokers out of ISR
79+
replica.lag.time.max.ms=1000
80+
replica.socket.timeout.ms=1000
81+
82+
############################# Log Flush Policy #############################
83+
84+
# Messages are immediately written to the filesystem but by default we only fsync() to sync
85+
# the OS cache lazily. The following configurations control the flush of data to disk.
86+
# There are a few important trade-offs here:
87+
# 1. Durability: Unflushed data may be lost if you are not using replication.
88+
# 2. Latency: Very large flush intervals may lead to latency spikes when the flush does occur as there will be a lot of data to flush.
89+
# 3. Throughput: The flush is generally the most expensive operation, and a small flush interval may lead to exceessive seeks.
90+
# The settings below allow one to configure the flush policy to flush data after a period of time or
91+
# every N messages (or both). This can be done globally and overridden on a per-topic basis.
92+
93+
# The number of messages to accept before forcing a flush of data to disk
94+
#log.flush.interval.messages=10000
95+
96+
# The maximum amount of time a message can sit in a log before we force a flush
97+
#log.flush.interval.ms=1000
98+
99+
############################# Log Retention Policy #############################
100+
101+
# The following configurations control the disposal of log segments. The policy can
102+
# be set to delete segments after a period of time, or after a given size has accumulated.
103+
# A segment will be deleted whenever *either* of these criteria are met. Deletion always happens
104+
# from the end of the log.
105+
106+
# The minimum age of a log file to be eligible for deletion
107+
log.retention.hours=168
108+
109+
# A size-based retention policy for logs. Segments are pruned from the log as long as the remaining
110+
# segments don't drop below log.retention.bytes.
111+
#log.retention.bytes=1073741824
112+
113+
# The maximum size of a log segment file. When this size is reached a new log segment will be created.
114+
log.segment.bytes=1073741824
115+
116+
# The interval at which log segments are checked to see if they can be deleted according
117+
# to the retention policies
118+
log.retention.check.interval.ms=300000
119+
120+
# By default the log cleaner is disabled and the log retention policy will default to just delete segments after their retention expires.
121+
# If log.cleaner.enable=true is set the cleaner will be enabled and individual logs can then be marked for log compaction.
122+
log.cleaner.enable=false
123+
124+
# tune down offset topics to reduce setup time in tests
125+
offsets.commit.timeout.ms=500
126+
offsets.topic.num.partitions=2
127+
offsets.topic.replication.factor=1
128+
129+
# Allow shorter session timeouts for tests
130+
group.min.session.timeout.ms=1000
131+
132+
133+
############################# Zookeeper #############################
134+
135+
# Zookeeper connection string (see zookeeper docs for details).
136+
# This is a comma separated host:port pairs, each corresponding to a zk
137+
# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
138+
# You can also append an optional chroot string to the urls to specify the
139+
# root directory for all kafka znodes.
140+
zookeeper.connect={zk_host}:{zk_port}/{zk_chroot}
141+
142+
# Timeout in ms for connecting to zookeeper
143+
zookeeper.connection.timeout.ms=30000
144+
# We want to expire kafka broker sessions quickly when brokers die b/c we restart them quickly
145+
zookeeper.session.timeout.ms=500
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
log4j.rootLogger=INFO, stdout, logfile
17+
18+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
19+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
20+
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n
21+
22+
log4j.appender.logfile=org.apache.log4j.FileAppender
23+
log4j.appender.logfile.File=${kafka.logs.dir}/server.log
24+
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
25+
log4j.appender.logfile.layout.ConversionPattern=[%d] %p %m (%c)%n
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
# the directory where the snapshot is stored.
16+
dataDir={tmp_dir}
17+
# the port at which the clients will connect
18+
clientPort={port}
19+
clientPortAddress={host}
20+
# disable the per-ip limit on the number of connections since this is a non-production config
21+
maxClientCnxns=0

0 commit comments

Comments
 (0)