No project description provided
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ksize-0.1.5.tar.gz.
File metadata
- Download URL: ksize-0.1.5.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.6 Darwin/23.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c536604124aa929f0a11983ad27bac24ca0635d5da19de23f767085a77318221
|
|
| MD5 |
98160ddf6dda6fe0f71834fb0db6582d
|
|
| BLAKE2b-256 |
48d9a9cc168afbdd14dc2c86e91b54f902d3b7d6383bf7e4d9d8bc0b655cb62a
|
File details
Details for the file ksize-0.1.5-py3-none-any.whl.
File metadata
- Download URL: ksize-0.1.5-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.6 Darwin/23.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68bce88518f2e96416b2c2bd857c517f414359a0914b70359442097efa53b640
|
|
| MD5 |
be0100c7ee38b1cd6454d8b735635929
|
|
| BLAKE2b-256 |
957efe410a3d92297974637bc5225b8ab08156997f5038bbf304cb6219782c1a
|