Repository navigation
Notisbook can now run a local Apache Kafka broker in Docker, manage its topics, load sample or your own data into it,
and read it from the local Spark and AWS Glue notebooks without any connector configuration.
Added
- Local Kafka integration. A single-node Apache Kafka 4.4.0 broker (KRaft) runs in Docker at
127.0.0.1:9092,
managed withnotisbook integrations listandnotisbook integrations kafka deploy|status|enable|disable|remove.
It lives outside the runtimes catalog: the app recreates the container when it opens and removes it when it closes,
and topics, offsets and the cluster id are kept in<home>/integrations/kafka/data. Docker commands need the app
open and use the app's Docker engine.remove --delete-dataalso empties the data folder after a confirmation. - Topic commands.
notisbook integrations kafka topic list|create|describe|deletework only on Notisbook's own
running container. Topic names are checked before Docker is called (letters, digits,.,_and-, up to 249
characters, no leading__). Topics take 1 to 8 partitions,create --if-not-existsmakes the command idempotent,
anddeleteasks for confirmation unless--yesis given. - Data loading with
topic produce. JSONL (one JSON object per line) comes from--file PATH, from stdin with
--file -, or from the bundledorderssample (200 synthetic orders, no personal data) with--sample orders.
--key-field iduses a top-level field as the message key, and--createwith--partitions Ncreates the topic
first. The whole input is validated before anything is published (10 MiB of input, 100 000 records, 512 KiB per
record, errors reported by line number). The result is confirmed from the topic offsets, for example
200/200 confirmadas no tópico orders.. - Kafka connector for the local Spark runtime. Installing or reinstalling Spark downloads
spark-sql-kafka-0-10, its token provider,kafka-clientsandcommons-pool2for the exact pyspark version, with
pinned sha256, into the shared jar cache, and runs akafka-smoke-okcheck. The jars go intospark.jars, so a
notebook reads Kafka withspark.read.format("kafka")and no configuration, andspark.jars.packagesstill works.
The API reportskafka_statusfor each installed Spark version. - Kafka connector for the AWS Glue runtime. The Glue kernel adds the Kafka connector jars that ship in the AWS
image tospark.jarsat launch, merged with the image's ownspark-defaults.conf. The Glue image is unchanged.
Changed
- The broker does not create topics automatically. A typo in
subscribe,writeStreamorproduceno longer
creates an empty topic: create topics withtopic createortopic produce --create. - Spark versions installed before 0.20.0 report
kafka_status: missing. Reinstall them in
Settings › Runtimes to get the Kafka connector. A kernel whose connector is missing or incomplete still opens,
without Kafka, and the app log says why. - Documentation.
README.mdhas a full CLI reference and a "Kafka Integration" section, tested on Docker Desktop
and Colima.