Skip to main content

freeza-offset

freeza-offset

What is it?

freeza-offset is a Python package that provides a simple way to commit the offset consumed by Spark Streaming in Kafka's ConsumerGroup.

Main Features

Here are just a few of the things that freeza-offset does well:

  • Commits the offset consumed in kafka
  • Tracking Spark consumption lag at Kafka
  • The offset is not just in control of the spark

Where to get it

The source code is currently hosted on GitHub at: https://github.com/HashLoad/freeza-offset

Binary installers for the latest released version are available at the Python package index and on conda.

# conda
conda install freeza-offset
# PyPI
pip install freeza-offset
# Databricks
dbutils.library.installPyPI("freeza-offset")

Dependencies

Installation from sources

In the freeza-offset directory (same one where you found this file after cloning the git repo), execute:

python setup.py install

Example:

pip install freeza-offset
from pyspark.sql import SparkSession

spark = SparkSession \
    .builder \
    .appName("FreezaCommitTest") \
    .getOrCreate()
df = spark \
  .readStream \
  .format("kafka") \
  .option("kafka.bootstrap.servers", "kafka1:9092,kafka2:9092,kafka3:9092") \
  .option("subscribe", "topic-name") \
  .option("startingOffsets", "earliest") \
  .option("kafka.group.id", "spark-freeza-runner") \
  .load()
df.selectExpr("key", "value")
qry = df.writeStream \
    .format("console") \
    .option("truncate","false") \
    .start()
import freeza
tr = freeza.start_commiter_thread(
    query=qry,
    bootstrap_servers=bootstrap_servers,
    group_id="spark-freeza-commiter"
)
tr.isAlive()

Getting Help

For usage questions, the best place to go to is open new issue

Contributing to freeza-offset

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.

License

MIT

Metadata

Release files for freeza-offset 1.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for freeza-offset 1.0.10
File Size Uploaded Provenance Actions
freeza-offset-1.0.10.tar.gz 3.5 kB Without provenance Details for freeza-offset-1.0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for freeza-offset 1.0.10
File Interpreter ABI Platform Actions
freeza_offset-1.0.10-py3-none-any.whl Python 3 none any Details for freeza_offset-1.0.10-py3-none-any.whl

Total release size: 7.9 kB

Release files / freeza-offset-1.0.10.tar.gz

Download URL freeza-offset-1.0.10.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
131d5e2ed99db2dd5e758cd5c4cbd7289f10099754d15dbc0808a073f19ff052
BLAKE2b-256 checksum
How to use checksums
3f1d2a121a1c202b13967eb555a0543bd77609bee3207f19d3269977c72eb842
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

Release files / freeza_offset-1.0.10-py3-none-any.whl

Download URL freeza_offset-1.0.10-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae65a9001299992c5fd5438ef0d6723e37b6df12a438fce8c2c002cdfb89c31b
BLAKE2b-256 checksum
How to use checksums
5dd333c4c38c2b36354e48134976cb0f62b02e8dca4175d11e0b25ffdeae6c2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

Security for freeza-offset 1.0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page