Skip to content

Commit bc4c2cb

Browse files
authored
Merge branch 'main' into chore/update-listener-classes
2 parents 43a33ca + 404459c commit bc4c2cb

File tree

27 files changed

+244
-462
lines changed

27 files changed

+244
-462
lines changed

.github/workflows/dev_nifi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ jobs:
2525
image-name: nifi
2626
# TODO (@NickLarsenNZ): Use a versioned image with stackable0.0.0-dev or stackableXX.X.X so that
2727
# the demo is reproducable for the release and it will be automatically replaced for the release branch.
28-
image-version: 2.4.0-postgresql
28+
image-version: 2.6.0-postgresql
2929
containerfile-path: demos/signal-processing/Dockerfile-nifi

demos/data-lakehouse-iceberg-trino-spark/LakehouseKafkaIngest.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

demos/data-lakehouse-iceberg-trino-spark/create-spark-ingestion-job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
echo 'Waiting for all nifi instances to be ready'
2727
kubectl wait --for=condition=ready --timeout=30m pod -l app.kubernetes.io/name=nifi,app.kubernetes.io/instance=nifi
2828
- name: wait-for-kafka-topics
29-
image: oci.stackable.tech/sdp/kafka:3.9.1-stackable0.0.0-dev
29+
image: oci.stackable.tech/sdp/kafka:4.1.0-stackable0.0.0-dev
3030
command:
3131
- bash
3232
- -euo

demos/nifi-kafka-druid-earthquake-data/IngestEarthquakesToKafka.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

demos/nifi-kafka-druid-water-level-data/IngestWaterLevelsToKafka.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM oci.stackable.tech/sdp/nifi:2.2.0-stackable0.0.0-dev
1+
FROM oci.stackable.tech/sdp/nifi:2.6.0-stackable0.0.0-dev
22

33
# This is the postgresql JDBC driver from https://jdbc.postgresql.org/download/
44
# There appear to be no signatures to validate against 😬
@@ -8,6 +8,6 @@ FROM oci.stackable.tech/sdp/nifi:2.2.0-stackable0.0.0-dev
88
# curl --fail -u "your_username" --upload-file "postgresql-$VERSION.jar" 'https://repo.stackable.tech/repository/misc/jdbc/'
99
# rm "postgresql-$VERSION.jar"
1010

11-
# IMPORTANT (@NickLarsenNZ): Changing this version requires a change in the NiFi template (DownloadAndWriteToDB.xml)
11+
# IMPORTANT (@NickLarsenNZ): Changing this version requires a change in the NiFi template (DownloadAndWriteToDB.json)
1212
ARG DRIVER_VERSION="42.7.5"
1313
RUN curl --fail -o "/stackable/nifi/postgresql-$DRIVER_VERSION.jar" "https://repo.stackable.tech/repository/misc/jdbc/postgresql-$DRIVER_VERSION.jar"

demos/signal-processing/DownloadAndWriteToDB.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"bundle": {
2525
"group": "org.apache.nifi",
2626
"artifact": "nifi-standard-nar",
27-
"version": "2.2.0"
27+
"version": "2.6.0"
2828
},
2929
"properties": {
3030
"Proxy Host": null,
@@ -337,7 +337,7 @@
337337
"bundle": {
338338
"group": "org.apache.nifi",
339339
"artifact": "nifi-standard-nar",
340-
"version": "2.2.0"
340+
"version": "2.6.0"
341341
},
342342
"properties": {
343343
"put-db-record-allow-multiple-statements": "false",
@@ -538,7 +538,7 @@
538538
"bundle": {
539539
"group": "org.apache.nifi",
540540
"artifact": "nifi-standard-nar",
541-
"version": "2.2.0"
541+
"version": "2.6.0"
542542
},
543543
"properties": {
544544
"Support Fragmented Transactions": "false",
@@ -729,7 +729,7 @@
729729
"bundle": {
730730
"group": "org.apache.nifi",
731731
"artifact": "nifi-dbcp-service-nar",
732-
"version": "2.2.0"
732+
"version": "2.6.0"
733733
},
734734
"properties": {
735735
"dbcp-min-idle-conns": "0",
@@ -873,7 +873,7 @@
873873
"bundle": {
874874
"group": "org.apache.nifi",
875875
"artifact": "nifi-standard-services-api-nar",
876-
"version": "2.2.0"
876+
"version": "2.6.0"
877877
}
878878
}
879879
],
@@ -891,7 +891,7 @@
891891
"bundle": {
892892
"group": "org.apache.nifi",
893893
"artifact": "nifi-record-serialization-services-nar",
894-
"version": "2.2.0"
894+
"version": "2.6.0"
895895
},
896896
"properties": {
897897
"ignore-csv-header": "false",
@@ -1064,7 +1064,7 @@
10641064
"bundle": {
10651065
"group": "org.apache.nifi",
10661066
"artifact": "nifi-standard-services-api-nar",
1067-
"version": "2.2.0"
1067+
"version": "2.6.0"
10681068
}
10691069
}
10701070
],
Binary file not shown.

docs/modules/demos/pages/logging.adoc

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,6 @@ To run this demo, your system needs at least:
2626

2727
If you use MacOS or Windows and use Docker to run Kubernetes, set the RAM to at least 4 GB in _Preferences > Resources_.
2828

29-
==== Linux
30-
31-
OpenSearch uses a mmapfs directory by default to store its indices. The default operating system limits on mmap counts
32-
are likely too low - usually 65530, which may result in out-of-memory exceptions. So, the Linux setting
33-
`vm.max_map_count` on the host machine where the containers are running must be set to at least 262144.
34-
35-
This is automatically set by default in this demo (via the `setSysctlMaxMapCount` Stack parameter).
36-
37-
OpenSearch has more information about this setting in their https://opensearch.org/docs/2.12/install-and-configure/install-opensearch/index/#important-settings[documentation].
38-
3929
== Overview
4030

4131
This demo will
@@ -63,15 +53,16 @@ To list the installed Stackable services run the following command:
6353
[source,console]
6454
----
6555
$ stackablectl stacklet list
66-
┌───────────────────────┬───────────────────────┬───────────┬─────────────────────────────────────────────────┬─────────────────────────────────┐
67-
│ PRODUCT ┆ NAME ┆ NAMESPACE ┆ ENDPOINTS ┆ CONDITIONS │
68-
╞═══════════════════════╪═══════════════════════╪═══════════╪═════════════════════════════════════════════════╪═════════════════════════════════╡
69-
│ zookeeper ┆ simple-zk ┆ default ┆ server-zk ┆ Available, Reconciling, Running │
70-
│ ┆ ┆ ┆ simple-zk-server.default.svc.cluster.local:2282 ┆ │
71-
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
72-
│ opensearch-dashboards ┆ opensearch-dashboards ┆ default ┆ http http://172.18.0.2:31734 ┆ │
73-
│ ┆ ┆ ┆ metrics 172.18.0.2:32120 ┆ │
74-
└───────────────────────┴───────────────────────┴───────────┴─────────────────────────────────────────────────┴─────────────────────────────────┘
56+
┌───────────────────────┬───────────────────────┬───────────┬────────────────────────────────────────────────────────────────────────────────────┬─────────────────────────────────┐
57+
│ PRODUCT ┆ NAME ┆ NAMESPACE ┆ ENDPOINTS ┆ CONDITIONS │
58+
╞═══════════════════════╪═══════════════════════╪═══════════╪════════════════════════════════════════════════════════════════════════════════════╪═════════════════════════════════╡
59+
│ opensearch ┆ opensearch ┆ default ┆ nodes-default-http http://opensearch-nodes-default.default.svc.cluster.local:9200 ┆ Available, Reconciling, Running │
60+
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
61+
│ zookeeper ┆ simple-zk ┆ default ┆ server-zk simple-zk-server.default.svc.cluster.local:2282 ┆ Available, Reconciling, Running │
62+
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
63+
│ opensearch-dashboards ┆ opensearch-dashboards ┆ default ┆ http http://172.18.0.2:30595 ┆ │
64+
│ ┆ ┆ ┆ metrics 172.18.0.2:31767 ┆ │
65+
└───────────────────────┴───────────────────────┴───────────┴────────────────────────────────────────────────────────────────────────────────────┴─────────────────────────────────┘
7566
----
7667

7768
include::partial$instance-hint.adoc[]

docs/modules/demos/pages/nifi-kafka-druid-earthquake-data.adoc

Lines changed: 0 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -86,103 +86,6 @@ $ stackablectl stacklet list
8686

8787
include::partial$instance-hint.adoc[]
8888

89-
== Inspect the data in Kafka
90-
91-
Kafka is an event streaming platform to stream the data in near real-time.
92-
All the messages put in and read from Kafka are structured in dedicated queues called topics.
93-
The test data will be put into a topic called earthquakes.
94-
The records are produced (written) by the test data generator and consumed (read) by Druid afterwards in the same order they were created.
95-
96-
As Kafka has no web interface, you must use a Kafka client like {kcat}[kcat].
97-
Kafka uses mutual TLS, so clients wanting to connect to Kafka must present a valid TLS certificate.
98-
The easiest way to obtain this is to shell into the `kafka-broker-default-0` Pod, as we will do in the following section for demonstration purposes.
99-
For a production setup, you should spin up a dedicated Pod provisioned with a certificate acting as a Kafka client instead of shell-ing into the Kafka Pod.
100-
101-
=== List the available Topics
102-
103-
You can execute a command on the Kafka broker to list the available topics as follows:
104-
105-
// In the following commands the kcat-prober container instead of the kafka container is used to send requests to Kafka.
106-
// This is necessary because kcat cannot use key- and truststore files with empty passwords, which are mounted here to the kafka container.
107-
// However, the kcat-prober container has TLS certificates mounted, which can be used by kcat to connect to Kafka.
108-
[source,console]
109-
----
110-
$ kubectl exec -it kafka-broker-default-0 -c kcat-prober -- /bin/bash -c "/stackable/kcat -b localhost:9093 -X security.protocol=SSL -X ssl.key.location=/stackable/tls-kcat/tls.key -X ssl.certificate.location=/stackable/tls-kcat/tls.crt -X ssl.ca.location=/stackable/tls-kcat/ca.crt -L"
111-
Metadata for all topics (from broker -1: ssl://localhost:9093/bootstrap):
112-
1 brokers:
113-
broker 1001 at 172.19.0.4:32321 (controller)
114-
1 topics:
115-
topic "earthquakes" with 8 partitions:
116-
partition 0, leader 1001, replicas: 1001, isrs: 1001
117-
partition 1, leader 1001, replicas: 1001, isrs: 1001
118-
partition 2, leader 1001, replicas: 1001, isrs: 1001
119-
partition 3, leader 1001, replicas: 1001, isrs: 1001
120-
partition 4, leader 1001, replicas: 1001, isrs: 1001
121-
partition 5, leader 1001, replicas: 1001, isrs: 1001
122-
partition 6, leader 1001, replicas: 1001, isrs: 1001
123-
partition 7, leader 1001, replicas: 1001, isrs: 1001
124-
----
125-
126-
You can see that Kafka consists of one broker, and the topic `earthquakes` with eight partitions has been created. To
127-
see some records sent to Kafka, run the following command. You can change the number of records to print via the `-c`
128-
parameter.
129-
130-
[source,console]
131-
----
132-
$ kubectl exec -it kafka-broker-default-0 -c kcat-prober -- /bin/bash -c "/stackable/kcat -b localhost:9093 -X security.protocol=SSL -X ssl.key.location=/stackable/tls-kcat/tls.key -X ssl.certificate.location=/stackable/tls-kcat/tls.crt -X ssl.ca.location=/stackable/tls-kcat/ca.crt -C -t earthquakes -c 1"
133-
----
134-
135-
Below is an example of the output of one record:
136-
137-
[source,json]
138-
----
139-
{
140-
"time":"1950-02-07T10:37:29.240Z",
141-
"latitude":45.949,
142-
"longitude":151.59,
143-
"depth":35.0,
144-
"mag":5.94,
145-
"magType":"mw",
146-
"nst":null,
147-
"gap":null,
148-
"dmin":null,
149-
"rms":null,
150-
"net":"iscgem",
151-
"id":"iscgem895202",
152-
"updated":"2022-04-26T18:23:38.377Z",
153-
"place":"Kuril Islands",
154-
"type":"earthquake",
155-
"horizontalError":null,
156-
"depthError":12.6,
157-
"magError":0.55,
158-
"magNst":null,
159-
"status":"reviewed",
160-
"locationSource":"iscgem",
161-
"magSource":"iscgem"
162-
}
163-
----
164-
165-
If you are interested in how many records have been produced to the Kafka topic so far, use the following command.
166-
It will print the last record produced to the topic partition, formatted with the pattern specified in the `-f` parameter.
167-
The given pattern will print some metadata of the record.
168-
169-
[source,console]
170-
----
171-
$ kubectl exec -it kafka-broker-default-0 -c kcat-prober -- /bin/bash -c "/stackable/kcat -b localhost:9093 -X security.protocol=SSL -X ssl.key.location=/stackable/tls-kcat/tls.key -X ssl.certificate.location=/stackable/tls-kcat/tls.crt -X ssl.ca.location=/stackable/tls-kcat/ca.crt -C -t earthquakes -o -8 -c 8 -f 'Topic %t / Partition %p / Offset: %o / Timestamp: %T\n'"
172-
Topic earthquakes / Partition 0 / Offset: 378859 / Timestamp: 1752584024936
173-
Topic earthquakes / Partition 0 / Offset: 378860 / Timestamp: 1752584024936
174-
Topic earthquakes / Partition 0 / Offset: 378861 / Timestamp: 1752584024936
175-
Topic earthquakes / Partition 0 / Offset: 378862 / Timestamp: 1752584024936
176-
Topic earthquakes / Partition 0 / Offset: 378863 / Timestamp: 1752584024936
177-
Topic earthquakes / Partition 0 / Offset: 378864 / Timestamp: 1752584024936
178-
Topic earthquakes / Partition 0 / Offset: 378865 / Timestamp: 1752584024936
179-
Topic earthquakes / Partition 0 / Offset: 378866 / Timestamp: 1752584024936
180-
----
181-
182-
If you calculate `379,000` records * `8` partitions, you end up with ~ 3,032,000 records.
183-
The output also shows that the last measurement record was produced at the timestamp `1752584024936`, which translates to `Tuesday, 15 July 2025 14:53:44.936 GMT+02:00`
184-
(using e.g. the command `date -d @1752584024`).
185-
18689
== NiFi
18790

18891
NiFi is used to fetch earthquake data from the internet and ingest it into Kafka.

0 commit comments

Comments
 (0)