Skip to content

Commit 538a264

Browse files
kmeinerzkmeinerz1
andauthored
Removing deprecated kafka generator (#820)
* removed deprecated kafka generator * added changelog entry --------- Co-authored-by: kmeinerz1 <kaithomas.meinerz@bwi.de>
1 parent 0163c45 commit 538a264

22 files changed

+12
-1590
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## next release
44
### Breaking
5+
6+
* removed the deprecated kafka generator. The new generator previously available via the kafka2 CLI has been renamed to kafka.
7+
58
### Features
69

710
* add `replacer` processor to replace substrings in fields using a syntax similar to the `dissector`

doc/source/user_manual/execution.rst

Lines changed: 5 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -27,71 +27,9 @@ and it can send events to a http endpoint as POST requests.
2727
Following sections describe the usage of these event generators.
2828

2929
Kafka
30-
^^^^^
31-
32-
The kafka load-tester can send a configurable amount of documents to Kafka.
33-
The documents that are being send can be obtained either from Kafka or from a file with JSON lines.
34-
35-
It can be configured how many documents should be retrieved from Kafka (if Kafka is used as source)
36-
and how many documents will be sent.
37-
Documents obtained from Kafka won't be written down to disk.
38-
39-
The documents will be sent repeatedly until the desired amount has been sent.
40-
The `tags` field and the `_index` field of each document will be set to `load-tester`.
41-
Furthermore, a field `load-tester-unique` with a unique value will be added to each document every
42-
time a document is sent.
43-
This is done to prevent that repeatedly sent documents are identical.
44-
45-
To find out more about the usage of the kafka load-tester execute:
46-
47-
.. code-block:: bash
48-
49-
logprep generate kafka --help
50-
51-
Configuration
52-
"""""""""""""
53-
54-
The kafka load-tester is configured via a YAML file.
55-
It must have the following format:
56-
57-
.. code-block:: yaml
58-
:caption: Example configuration file for the kafka load-tester
59-
60-
logging_level: LOG_LEVEL # Default: "INFO"
61-
source_count: INTEGER # Number of documents to obtain form Kafka
62-
count: INTEGER # Number of documents to send
63-
process_count: INTEGER # Number of processes (default: 1)
64-
profile: BOOL # Shows profiling data (default: false)
65-
target_send_per_sec: INTEGER # Desired number of documents to send per second with each process. Setting it to 0 sends as much as possible (default: 0).
66-
67-
kafka:
68-
bootstrap_servers: # List of bootstrap servers
69-
- URL:PORT # i.e. "127.0.0.1:9092"
70-
consumer: # Kafka consumer
71-
topic: STRING # Topic to obtain documents from
72-
group_id: STRING # Should be different from the group_id of the Logprep Consumer, otherwise the offset in Logprep will be changed!
73-
timeout: FLOAT # Timeout for retrieving documents (default: 1.0)
74-
producer: # Kafka producer
75-
acks: STRING/INTEGER # Determines if sending should be acknowledged (default: 0)
76-
compression_type: STRING # Compression type (default: "none")
77-
topic: STRING # Topic to send documents to
78-
queue_buffering_max_messages: INTEGER # Batch for sending documents (default: 10000)
79-
linger_ms: INTEGER # Time to wait before a batch is sent if the max wasn't reached before (default: 5000)
80-
flush_timeout: FLOAT # Timeout to flush the producer (default 30.0)
81-
ssl: # SSL authentication (Optional)
82-
ca_location: STRING
83-
certificate_location: STRING
84-
key:
85-
location: STRING
86-
password: STRING # Optional
87-
88-
Unused parameters must be removed or commented.
89-
90-
91-
Kafka2
9230
^^^^^^
9331

94-
Kafka2 is a load tester for generating events based on templated sample files
32+
Kafka is a load tester for generating events based on templated sample files
9533
stored in a dataset directory. These events are then sent to specified Kafka topics.
9634
The event generation process is identical to the :ref:`http_generator` generator.
9735

@@ -127,7 +65,7 @@ To learn more about the Kafka event generator, run:
12765

12866
.. code-block:: bash
12967
130-
logprep generate kafka2 --help
68+
logprep generate kafka --help
13169
13270
13371
@@ -380,7 +318,7 @@ To generate events and send them to Kafka, follow these steps:
380318

381319
.. code-block:: bash
382320
383-
logprep generate kafka2 --input-dir ./examples/exampledata/input_logdata/ --batch-size 1000 --events 10000 --output-config '{"bootstrap.servers": "127.0.0.1:9092"}'
321+
logprep generate kafka --input-dir ./examples/exampledata/input_logdata/ --batch-size 1000 --events 10000 --output-config '{"bootstrap.servers": "127.0.0.1:9092"}'
384322
385323
3. When executed, the console should display output similar to the following
386324

@@ -401,12 +339,12 @@ Here is an example of a more extensive output configuration for the ConfluentKaf
401339

402340
.. code-block:: bash
403341
404-
logprep generate kafka2 --output-config '{"bootstrap.servers": "127.0.0.1:9092", "enable.ssl.certificate.verification" : "true"}' --input-dir ./examples/exampledata/input_logdata/ --batch-size 1000 --events 10000
342+
logprep generate kafka --output-config '{"bootstrap.servers": "127.0.0.1:9092", "enable.ssl.certificate.verification" : "true"}' --input-dir ./examples/exampledata/input_logdata/ --batch-size 1000 --events 10000
405343
406344
For a full list of available options, refer to the `ConfluentKafka documentation <https://docs.confluent.io/platform/current/clients/librdkafka/html/md_CONFIGURATION.html>`_.
407345

408346
The :code:`--send_timeout` option determines the maximum wait time for an answer from the broker on polling.
409347

410348
.. code-block:: bash
411349
412-
logprep generate kafka2 --send-timeout 2 --input-dir ./examples/exampledata/input_logdata/ --output-config '{"bootstrap.servers": "127.0.0.1:9092"}' --batch-size 1000 --events 10000
350+
logprep generate kafka --send-timeout 2 --input-dir ./examples/exampledata/input_logdata/ --output-config '{"bootstrap.servers": "127.0.0.1:9092"}' --batch-size 1000 --events 10000

logprep/generator/kafka/__init__.py

Whitespace-only changes.

logprep/generator/kafka/configuration.py

Lines changed: 0 additions & 86 deletions
This file was deleted.

logprep/generator/kafka/document_loader.py

Lines changed: 0 additions & 77 deletions
This file was deleted.

logprep/generator/kafka/document_sender.py

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)