Skip to content

Commit 96c600f

Browse files
Chris Choschmalliso
authored andcommitted
DOCSP-10975: replace blacklist and whitelist (#27)
1 parent f238c47 commit 96c600f

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

source/kafka-sink-postprocessors.txt

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -44,29 +44,29 @@ class:
4444

4545
.. seealso:: :ref:`Strategy options and configuration <config-document-id-adder>`.
4646

47-
* - BlacklistKeyProjector
48-
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.BlacklistKeyProjector``
47+
* - BlocklistKeyProjector
48+
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.BlocklistKeyProjector``
4949
| Removes matching key fields from the sink record.
5050

51-
.. seealso:: :ref:`Configuration <config-blacklist-whitelist>` and :ref:`Example <blacklist-example>`.
51+
.. seealso:: :ref:`Configuration <config-blocklist-allowlist>` and :ref:`Example <blocklist-example>`.
5252

53-
* - BlacklistValueProjector
54-
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.BlacklistValueProjector``
53+
* - BlocklistValueProjector
54+
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.BlocklistValueProjector``
5555
| Removes matching value fields from the sink record.
5656

57-
.. seealso:: :ref:`Configuration <config-blacklist-whitelist>` and :ref:`Example <blacklist-example>`.
57+
.. seealso:: :ref:`Configuration <config-blocklist-allowlist>` and :ref:`Example <blocklist-example>`.
5858

59-
* - WhitelistKeyProjector
60-
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.WhitelistKeyProjector``
59+
* - AllowlistKeyProjector
60+
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.AllowlistKeyProjector``
6161
| Includes only matching key fields from the sink record.
6262

63-
.. seealso:: :ref:`Configuration <config-blacklist-whitelist>` and :ref:`Example <whitelist-example>`.
63+
.. seealso:: :ref:`Configuration <config-blocklist-allowlist>` and :ref:`Example <allowlist-example>`.
6464

65-
* - WhitelistValueProjector
66-
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.WhitelistValueProjector``
65+
* - AllowlistValueProjector
66+
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.AllowlistValueProjector``
6767
| matching value fields from the sink record.
6868

69-
.. seealso:: :ref:`Configuration <config-blacklist-whitelist>` and :ref:`Example <whitelist-example>`.
69+
.. seealso:: :ref:`Configuration <config-blocklist-allowlist>` and :ref:`Example <allowlist-example>`.
7070

7171
* - KafkaMetaAdder
7272
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.KafkaMetaAdder``
@@ -89,7 +89,7 @@ comma separated list of fully-qualified ``PostProcessor`` class names:
8989

9090
.. code-block:: properties
9191

92-
post.processor.chain=com.mongodb.kafka.connect.sink.processor.KafkaMetaAdder,com.mongodb.kafka.connect.sink.processor.WhitelistValueProjector
92+
post.processor.chain=com.mongodb.kafka.connect.sink.processor.KafkaMetaAdder,com.mongodb.kafka.connect.sink.processor.AllowlistValueProjector
9393

9494
.. note::
9595

@@ -147,12 +147,12 @@ provided with this connector:
147147

148148
* - PartialKeyStrategy
149149
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.id.strategy.PartialKeyStrategy``
150-
| Uses a blacklist or whitelist projection of the key structure of the ``SinkDocument``.
150+
| Uses a blocklist or allowlist projection of the key structure of the ``SinkDocument``.
151151
| Defaults to a blank document if no key exists.
152152

153153
* - PartialValueStrategy
154154
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.id.strategy.PartialValueStrategy``
155-
| Uses a blacklist or whitelist projection of the value structure of the ``SinkDocument``.
155+
| Uses a blocklist or allowlist projection of the value structure of the ``SinkDocument``.
156156
| Defaults to a blank document if no value exists.
157157

158158
* - UuidStrategy
@@ -179,9 +179,9 @@ setting.
179179
Other strategies permit exactly-once delivery if the fields that form
180180
the document *_id* are guaranteed to be unique.
181181

182-
.. _config-blacklist-whitelist:
182+
.. _config-blocklist-allowlist:
183183

184-
Blacklist / Whitelist Projector
184+
Blocklist / Allowlist Projector
185185
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
186186

187187
This section provides example projection configurations to show how they
@@ -224,18 +224,18 @@ filter the following sample record:
224224
to avoid repetition. Specify the one appropriate to your use case when
225225
creating your configuration.
226226

227-
.. _blacklist-example:
227+
.. _blocklist-example:
228228

229-
Blacklist Projection Example
229+
Blocklist Projection Example
230230
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
231231

232-
In the following example sink configuration, we specify a blacklist
232+
In the following example sink configuration, we specify a blocklist
233233
projection and the specific fields to omit from the record:
234234

235235
.. code-block:: properties
236236

237-
post.processor.chain=com.mongodb.kafka.connect.sink.processor.Blacklist[Key|Value]Projector
238-
[key|value].projection.type=blacklist
237+
post.processor.chain=com.mongodb.kafka.connect.sink.processor.Blocklist[Key|Value]Projector
238+
[key|value].projection.type=blocklist
239239
[key|value].projection.list=age,address.city,lut.key2,data.v
240240

241241
.. note::
@@ -272,18 +272,18 @@ The record contains the following data after applying the projection:
272272
}
273273
}
274274

275-
.. _whitelist-example:
275+
.. _allowlist-example:
276276

277-
Whitelist Projection Example
277+
Allowlist Projection Example
278278
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
279279

280-
In the following example sink configuration, we specify a whitelist
280+
In the following example sink configuration, we specify a allowlist
281281
projection and the specific fields to include in the record:
282282

283283
.. code-block:: properties
284284

285-
post.processor.chain=com.mongodb.kafka.connect.sink.processor.Whitelist[Key|Value]Projector
286-
[key|value].projection.type=whitelist
285+
post.processor.chain=com.mongodb.kafka.connect.sink.processor.Allowlist[Key|Value]Projector
286+
[key|value].projection.type=allowlist
287287
[key|value].projection.list=age,address.city,lut.key2,data.v
288288

289289
.. note::
@@ -350,15 +350,15 @@ projection output from the following sample record:
350350
}
351351
}
352352

353-
**Whitelist Wildcard Examples**
353+
**Allowlist Wildcard Examples**
354354

355355
The ``*`` wildcard pattern in the example below matches all the keys named
356356
``temp`` in the ``forecast`` array and all fields nested a single level
357357
below it.
358358

359359
.. code-block:: properties
360360

361-
[key|value].projection.type=whitelist
361+
[key|value].projection.type=allowlist
362362
[key|value].projection.list=city,forecast.temp.*
363363

364364
The record contains the following data after applying the projection:
@@ -386,7 +386,7 @@ all levels that contain the field ``scale``.
386386

387387
.. code-block:: properties
388388

389-
[key|value].projection.type=whitelist
389+
[key|value].projection.type=allowlist
390390
[key|value].projection.list=**.scale
391391

392392
The record contains the following data after applying the projection:
@@ -401,15 +401,15 @@ The record contains the following data after applying the projection:
401401
}
402402
}
403403

404-
**Blacklist Wildcard Examples**
404+
**Blocklist Wildcard Examples**
405405

406406
The wildcard character can also be used to match all field names at
407-
specific levels as demonstrated in the following blacklist projection
407+
specific levels as demonstrated in the following blocklist projection
408408
configuration example:
409409

410410
.. code-block:: properties
411411

412-
[key|value].projection.type=blacklist
412+
[key|value].projection.type=blocklist
413413
[key|value].projection.list=population,forecast.*.*
414414

415415
The record contains the following data after applying the projection:
@@ -433,7 +433,7 @@ specified.
433433

434434
.. code-block:: properties
435435

436-
[key|value].projection.type=blacklist
436+
[key|value].projection.type=blocklist
437437
[key|value].projection.list=**.high
438438

439439
{
@@ -711,7 +711,7 @@ file:
711711

712712
document.id.strategy=com.mongodb.kafka.connect.sink.processor.id.strategy.PartialValueStrategy
713713
value.projection.list=flight_no,airport_code
714-
value.projection.type=whitelist
714+
value.projection.type=allowlist
715715
writemodel.strategy=com.mongodb.kafka.connect.sink.writemodel.strategy.ReplaceOneBusinessKeyStrategy"
716716

717717
The sample data inserted into the collection contains the following:
@@ -752,7 +752,7 @@ values without changing the ``_id`` field.
752752
The ``PartialValueStrategy`` id strategy uses the
753753
``[key|value].projection.type`` and ``[key|value].projection.list``
754754
settings to define which fields are used to form the ``_id`` field.
755-
Since the Blacklist and Whitelist post processors use the same
755+
Since the Blocklist and Allowlist post processors use the same
756756
projection settings, they cannot be specified separately. Use a `Single
757757
Message Transform (SMT)
758758
<https://docs.confluent.io/current/connect/transforms/index.html>`_

source/kafka-sink-properties.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ data to sink to MongoDB. For an example configuration file, see
164164
- | The type of key projection to use.
165165
|
166166
| **Default**: ``none``
167-
| **Accepted Values**: ``none``, ``blacklist``, or ``whitelist``
167+
| **Accepted Values**: ``none``, ``blocklist``, or ``allowlist`` (*Deprecated: blacklist, whitelist*)
168168

169169
* - post.processor.chain
170170
- list
@@ -199,7 +199,7 @@ data to sink to MongoDB. For an example configuration file, see
199199
- | The type of value projection to use.
200200
|
201201
| **Default**: ``none``
202-
| **Accepted Values**: ``none``, ``blacklist``, or ``whitelist``
202+
| **Accepted Values**: ``none``, ``blocklist``, or ``allowlist`` (*Deprecated: blacklist, whitelist*)
203203

204204
* - writemodel.strategy
205205
- string
@@ -245,8 +245,8 @@ Example: Override Connector Sink Settings on TopicA
245245
topic.override.topicA.collection=collectionA
246246
topic.override.topicA.max.batch.size=100
247247
topic.override.topicA.document.id.strategy=com.mongodb.kafka.connect.sink.processor.id.strategy.UuidStrategy
248-
topic.override.topicA.post.processor.chain=com.mongodb.kafka.connect.sink.processor.DocumentIdAdder,com.mongodb.kafka.connect.sink.processor.BlacklistValueProjector
249-
topic.override.topicA.value.projection.type=blacklist
248+
topic.override.topicA.post.processor.chain=com.mongodb.kafka.connect.sink.processor.DocumentIdAdder,com.mongodb.kafka.connect.sink.processor.BlocklistValueProjector
249+
topic.override.topicA.value.projection.type=blocklist
250250
topic.override.topicA.value.projection.list=k2,k4
251251

252252
The sink connector topic override settings instruct the connector to apply
@@ -255,7 +255,7 @@ the following behavior for data consumed from ``topicA``:
255255
- Write documents to the MongoDB collection ``collectionA`` in batches of
256256
up to 100.
257257
- Generate a UUID to be stored in the ``_id`` field for each new document.
258-
- Omit fields ``k2`` and ``k4`` from the value projection using a blacklist.
258+
- Omit fields ``k2`` and ``k4`` from the value projection using a blocklist.
259259

260260

261261
Dead Letter Queue Configuration Settings

0 commit comments

Comments
 (0)