ksize
A Tool for Kafka Topic Size
The Kafka Topic Size Tool is a command-line utility that provides information about the size of topics in a Kafka cluster. It utilizes the Kafka command-line tools kafka-topics and kafka-log-dirs to retrieve and analyze the size information.
Installation
You can install the Kafka Topic Size Tool from PyPI using pip:
pip install ksize
Usage
Command Syntax
ksize -b <bootstrap-server> [-c <config>] (-t <topic> | -a) [-o <output>]
Options
-b,--bootstrap-server: The Kafka cluster to connect to (e.g.,localhost:9092).-c,--config: The path to the Kafka config file.-t,--topic: The topic or list of topics to get the size for.-a,--all: Get the size for all topics.-o,--output: Send output to a file.
Examples
- Get the size of a specific topic:
ksize -b localhost:9092 -c /path/to/config/file.conf -t my_topic -o output.txt
- Get the size of all topics:
ksize -b localhost:9092 -c /path/to/config/file.conf -a -o output.txt
Important Notes
- Either
--topicor--allis required. - Make sure you have the Kafka command-line tools (
kafka-topicsandkafka-log-dirs) installed and available in your system's PATH. - The tool calculates the size of topics in megabytes (MB).
- If an error occurs during the process, it will be displayed in the console output.
License
This tool is provided under the MIT License. Feel free to use, modify, and distribute it according to the terms of the license.
Metadata
Release files for ksize 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ksize-0.1.5.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ksize-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.5 kB
Release files / ksize-0.1.5.tar.gz
| Download URL | ksize-0.1.5.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c536604124aa929f0a11983ad27bac24ca0635d5da19de23f767085a77318221
|
|
BLAKE2b-256 checksum How to use checksums |
48d9a9cc168afbdd14dc2c86e91b54f902d3b7d6383bf7e4d9d8bc0b655cb62a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.6 Darwin/23.1.0
|
Release files / ksize-0.1.5-py3-none-any.whl
| Download URL | ksize-0.1.5-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68bce88518f2e96416b2c2bd857c517f414359a0914b70359442097efa53b640
|
|
BLAKE2b-256 checksum How to use checksums |
957efe410a3d92297974637bc5225b8ab08156997f5038bbf304cb6219782c1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.6 Darwin/23.1.0
|