Skip to content

Commit 367eb4b

Browse files
Incremental alter configs implementation [KIP-339] (#1517)
requires broker version >= 2.3.0 --------- Co-authored-by: Emanuele Sabellico <[email protected]>
1 parent f26ebaf commit 367eb4b

File tree

14 files changed

+794
-81
lines changed

14 files changed

+794
-81
lines changed

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
# Confluent's Python client for Apache Kafka
22

3+
## v2.2.0
4+
5+
v2.2.0 is a feature release with the following features, fixes and enhancements:
6+
7+
- [KIP-339](https://cwiki.apache.org/confluence/display/KAFKA/KIP-339%3A+Create+a+new+IncrementalAlterConfigs+API)
8+
IncrementalAlterConfigs API (#1517).
9+
10+
confluent-kafka-python is based on librdkafka v2.2.0, see the
11+
[librdkafka release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.2.0)
12+
for a complete list of changes, enhancements, fixes and upgrade considerations.
13+
14+
315
## v2.1.1
416

517
v2.1.1 is a maintenance release with the following fixes and enhancements:
618

7-
819
### Fixes
920

1021
- Added a new ConsumerGroupState UNKNOWN. The typo state UNKOWN is deprecated and will be removed in the next major version.

docs/conf.py

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15+
import sphinx_rtd_theme
1516
import sys
1617
import os
1718
from glob import glob
@@ -41,7 +42,7 @@
4142

4243

4344
# If your documentation needs a minimal Sphinx version, state it here.
44-
#needs_sphinx = '1.0'
45+
# needs_sphinx = '1.0'
4546

4647
# Add any Sphinx extension module names here, as strings. They can be
4748
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -67,46 +68,45 @@
6768

6869
# The language for content autogenerated by Sphinx. Refer to documentation
6970
# for a list of supported languages.
70-
#language = None
71+
# language = None
7172

7273
# There are two options for replacing |today|: either, you set today to some
7374
# non-false value, then it is used:
74-
#today = ''
75+
# today = ''
7576
# Else, today_fmt is used as the format for a strftime call.
76-
#today_fmt = '%B %d, %Y'
77+
# today_fmt = '%B %d, %Y'
7778

7879
# List of patterns, relative to source directory, that match files and
7980
# directories to ignore when looking for source files.
8081
exclude_patterns = ['_build']
8182

8283
# The reST default role (used for this markup: `text`) to use for all
8384
# documents.
84-
#default_role = None
85+
# default_role = None
8586

8687
# If true, '()' will be appended to :func: etc. cross-reference text.
87-
#add_function_parentheses = True
88+
# add_function_parentheses = True
8889

8990
# If true, the current module name will be prepended to all description
9091
# unit titles (such as .. function::).
91-
#add_module_names = True
92+
# add_module_names = True
9293

9394
# If true, sectionauthor and moduleauthor directives will be shown in the
9495
# output. They are ignored by default.
95-
#show_authors = False
96+
# show_authors = False
9697

9798
# The name of the Pygments (syntax highlighting) style to use.
9899
pygments_style = 'sphinx'
99100

100101
# A list of ignored prefixes for module index sorting.
101-
#modindex_common_prefix = []
102+
# modindex_common_prefix = []
102103

103104
# If true, keep warnings as "system message" paragraphs in the built documents.
104-
#keep_warnings = False
105+
# keep_warnings = False
105106

106107

107108
# -- Options for HTML output ----------------------------------------------
108109

109-
import sphinx_rtd_theme
110110

111111
# The theme to use for HTML and HTML Help pages. See the documentation for
112112
# a list of builtin themes.
@@ -118,74 +118,74 @@
118118
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
119119

120120
# Add any paths that contain custom themes here, relative to this directory.
121-
#html_theme_path = []
121+
# html_theme_path = []
122122

123123
# The name for this set of Sphinx documents. If None, it defaults to
124124
# "<project> v<release> documentation".
125-
#html_title = None
125+
# html_title = None
126126

127127
# A shorter title for the navigation bar. Default is the same as html_title.
128-
#html_short_title = None
128+
# html_short_title = None
129129

130130
# The name of an image file (relative to this directory) to place at the top
131131
# of the sidebar.
132-
#html_logo = None
132+
# html_logo = None
133133

134134
# The name of an image file (within the static path) to use as favicon of the
135135
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
136136
# pixels large.
137-
#html_favicon = None
137+
# html_favicon = None
138138

139139
# Add any paths that contain custom static files (such as style sheets) here,
140140
# relative to this directory. They are copied after the builtin static files,
141141
# so a file named "default.css" will overwrite the builtin "default.css".
142-
#html_static_path = ['_static']
142+
# html_static_path = ['_static']
143143

144144
# Add any extra paths that contain custom files (such as robots.txt or
145145
# .htaccess) here, relative to this directory. These files are copied
146146
# directly to the root of the documentation.
147-
#html_extra_path = []
147+
# html_extra_path = []
148148

149149
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
150150
# using the given strftime format.
151-
#html_last_updated_fmt = '%b %d, %Y'
151+
# html_last_updated_fmt = '%b %d, %Y'
152152

153153
# If true, SmartyPants will be used to convert quotes and dashes to
154154
# typographically correct entities.
155-
#html_use_smartypants = True
155+
# html_use_smartypants = True
156156

157157
# Custom sidebar templates, maps document names to template names.
158-
#html_sidebars = {}
158+
# html_sidebars = {}
159159

160160
# Additional templates that should be rendered to pages, maps page names to
161161
# template names.
162-
#html_additional_pages = {}
162+
# html_additional_pages = {}
163163

164164
# If false, no module index is generated.
165-
#html_domain_indices = True
165+
# html_domain_indices = True
166166

167167
# If false, no index is generated.
168-
#html_use_index = True
168+
# html_use_index = True
169169

170170
# If true, the index is split into individual pages for each letter.
171-
#html_split_index = False
171+
# html_split_index = False
172172

173173
# If true, links to the reST sources are added to the pages.
174-
#html_show_sourcelink = True
174+
# html_show_sourcelink = True
175175

176176
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
177-
#html_show_sphinx = True
177+
# html_show_sphinx = True
178178

179179
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
180-
#html_show_copyright = True
180+
# html_show_copyright = True
181181

182182
# If true, an OpenSearch description file will be output, and all pages will
183183
# contain a <link> tag referring to it. The value of this option must be the
184184
# base URL from which the finished HTML is served.
185-
#html_use_opensearch = ''
185+
# html_use_opensearch = ''
186186

187187
# This is the file name suffix for HTML files (e.g. ".xhtml").
188-
#html_file_suffix = None
188+
# html_file_suffix = None
189189

190190
# Output file base name for HTML help builder.
191191
htmlhelp_basename = 'confluent-kafkadoc'
@@ -194,43 +194,43 @@
194194
# -- Options for LaTeX output ---------------------------------------------
195195

196196
latex_elements = {
197-
# The paper size ('letterpaper' or 'a4paper').
198-
#'papersize': 'letterpaper',
197+
# The paper size ('letterpaper' or 'a4paper').
198+
# 'papersize': 'letterpaper',
199199

200-
# The font size ('10pt', '11pt' or '12pt').
201-
#'pointsize': '10pt',
200+
# The font size ('10pt', '11pt' or '12pt').
201+
# 'pointsize': '10pt',
202202

203-
# Additional stuff for the LaTeX preamble.
204-
#'preamble': '',
203+
# Additional stuff for the LaTeX preamble.
204+
# 'preamble': '',
205205
}
206206

207207
# Grouping the document tree into LaTeX files. List of tuples
208208
# (source start file, target name, title,
209209
# author, documentclass [howto, manual, or own class]).
210210
latex_documents = [
211-
('index', 'confluent-kafka.tex', u'confluent-kafka Documentation',
212-
u'Magnus Edenhill', 'manual'),
211+
('index', 'confluent-kafka.tex', u'confluent-kafka Documentation',
212+
u'Magnus Edenhill', 'manual'),
213213
]
214214

215215
# The name of an image file (relative to this directory) to place at the top of
216216
# the title page.
217-
#latex_logo = None
217+
# latex_logo = None
218218

219219
# For "manual" documents, if this is true, then toplevel headings are parts,
220220
# not chapters.
221-
#latex_use_parts = False
221+
# latex_use_parts = False
222222

223223
# If true, show page references after internal links.
224-
#latex_show_pagerefs = False
224+
# latex_show_pagerefs = False
225225

226226
# If true, show URL addresses after external links.
227-
#latex_show_urls = False
227+
# latex_show_urls = False
228228

229229
# Documents to append as an appendix to all manuals.
230-
#latex_appendices = []
230+
# latex_appendices = []
231231

232232
# If false, no module index is generated.
233-
#latex_domain_indices = True
233+
# latex_domain_indices = True
234234

235235

236236
# -- Options for manual page output ---------------------------------------
@@ -243,7 +243,7 @@
243243
]
244244

245245
# If true, show URL addresses after external links.
246-
#man_show_urls = False
246+
# man_show_urls = False
247247

248248

249249
# -- Options for Texinfo output -------------------------------------------
@@ -252,21 +252,21 @@
252252
# (source start file, target name, title, author,
253253
# dir menu entry, description, category)
254254
texinfo_documents = [
255-
('index', 'confluent-kafka', u'confluent-kafka Documentation',
256-
u'Magnus Edenhill', 'confluent-kafka', 'One line description of project.',
257-
'Miscellaneous'),
255+
('index', 'confluent-kafka', u'confluent-kafka Documentation',
256+
u'Magnus Edenhill', 'confluent-kafka', 'One line description of project.',
257+
'Miscellaneous'),
258258
]
259259

260260
# Documents to append as an appendix to all manuals.
261-
#texinfo_appendices = []
261+
# texinfo_appendices = []
262262

263263
# If false, no module index is generated.
264-
#texinfo_domain_indices = True
264+
# texinfo_domain_indices = True
265265

266266
# How to display URL addresses: 'footnote', 'no', or 'inline'.
267-
#texinfo_show_urls = 'footnote'
267+
# texinfo_show_urls = 'footnote'
268268

269269
# If true, do not generate a @detailmenu in the "Top" node's menu.
270-
#texinfo_no_detailmenu = False
270+
# texinfo_no_detailmenu = False
271271

272272
autodoc_member_order = 'bysource'

docs/index.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Supporting classes
4545
- :ref:`ConfigResource <pythonclient_config_resource>`
4646
- :ref:`ResourceType <pythonclient_resource_type>`
4747
- :ref:`ResourcePatternType <pythonclient_resource_pattern_type>`
48+
- :ref:`AlterConfigOpType <pythonclient_alter_config_op_type>`
4849
- :ref:`AclOperation <pythonclient_acl_operation>`
4950
- :ref:`AclPermissionType <pythonclient_acl_permission_type>`
5051
- :ref:`AclBinding <pythonclient_acl_binding>`
@@ -142,6 +143,15 @@ ResourcePatternType
142143
.. autoclass:: confluent_kafka.admin.ResourcePatternType
143144
:members:
144145

146+
.. _pythonclient_alter_config_op_type:
147+
148+
*****************
149+
AlterConfigOpType
150+
*****************
151+
152+
.. autoclass:: confluent_kafka.admin.AlterConfigOpType
153+
:members:
154+
145155
.. _pythonclient_acl_operation:
146156

147157
**************
@@ -713,14 +723,14 @@ providing a dict of configuration properties to the instance constructor, e.g.
713723
.. code-block:: python
714724
715725
conf = {'bootstrap.servers': 'mybroker.com',
716-
'group.id': 'mygroup',
726+
'group.id': 'mygroup',
717727
'session.timeout.ms': 6000,
718728
'on_commit': my_commit_callback,
719729
'auto.offset.reset': 'earliest'}
720730
consumer = confluent_kafka.Consumer(conf)
721731
722732
723-
The Python client provides the following configuration properties in
733+
The Python client provides the following configuration properties in
724734
addition to the properties dictated by the underlying librdkafka C library:
725735

726736
* ``default.topic.config``: value is a dict of client topic-level configuration
@@ -778,4 +788,4 @@ addition to the properties dictated by the underlying librdkafka C library:
778788
In the Python client, the ``logger`` configuration property is used for log handler, not ``log_cb``.
779789

780790
For the full range of configuration properties, please consult librdkafka's documentation:
781-
https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md
791+
https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md

0 commit comments

Comments
 (0)