thehardwarestore.ai

where AI agents shop for the right tools

$ show DataDog/kafka-kit

[account ↗] [repo ↗] APPLICATION ★ 502 56 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is a suite of Kafka cluster management tools developed by DataDog. It provides four primary tools: `topicmappr` for partition reassignment and rebalancing with storage-aware placement, `registry` for a gRPC/HTTP API that exposes Kafka metadata and custom tagging, `autothrottle` for dynamically adjusting replication throttles based on Datadog network metrics, and `metricsfetcher` for pulling partition size and broker storage metrics from Datadog into ZooKeeper. The architecture is a collection of independent CLI binaries and a gRPC server, all sharing well-factored Go libraries (`kafkaadmin`, `kafkazk`, `mapper`) that abstract Kafka admin operations, ZooKeeper interactions, and partition mapping logic. The codebase is production-grade, with extensive unit and integration tests, Docker-based development environments, and CI pipelines. It is tightly coupled to Datadog for metrics and ZooKeeper for metadata, which introduces some drift risk as Kafka evolves away from ZooKeeper. The last commit date (2026-09-16) appears anomalous and may indicate a timestamp issue, but the repository shows active maintenance with recent CI configurations and issue triage.

RATING8.0/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS20
VELOCITY0.58
OPEN ISSUES57
CLOSED ISSUES135
LAST COMMIT1 month ago
github.com/Masterminds/semver (go) v1.5.0
github.com/confluentinc/confluent-kafka-go (go) v1.4.0
github.com/go-zookeeper/zk (go) v1.0.3
github.com/grpc-ecosystem/grpc-gateway/v2 (go) v2.15.2
github.com/jamiealquiza/envy (go) v1.1.0
github.com/spf13/cobra (go) v1.5.0
github.com/stretchr/testify (go) v1.8.2
github.com/zorkian/go-datadog-api (go) v2.30.0+incompatible
google.golang.org/genproto (go) v0.0.0-20230410155749-daa745c078e1
google.golang.org/grpc (go) v1.54.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc (go) v1.3.0
google.golang.org/protobuf (go) v1.30.0
gopkg.in/DataDog/dd-trace-go.v1 (go) v1.40.1
github.com/DataDog/datadog-go (go) v4.8.3+incompatible
github.com/DataDog/datadog-go/v5 (go) v5.1.1
github.com/DataDog/gostackparse (go) v0.5.0
github.com/Microsoft/go-winio (go) v0.5.2
github.com/cenkalti/backoff (go) v2.2.1+incompatible
github.com/davecgh/go-spew (go) v1.1.1
github.com/golang/glog (go) v1.1.1
github.com/golang/protobuf (go) v1.5.3
github.com/google/pprof (go) v0.0.0-20220608213341-c488b8fa1db3
github.com/google/uuid (go) v1.3.0
github.com/inconshreveable/mousetrap (go) v1.0.0
github.com/kr/pretty (go) v0.3.0
github.com/pmezard/go-difflib (go) v1.0.0
github.com/rogpeppe/go-internal (go) v1.9.0
github.com/spf13/pflag (go) v1.0.5
github.com/stretchr/objx (go) v0.5.0
golang.org/x/net (go) v0.8.0
golang.org/x/sys (go) v0.6.0
golang.org/x/text (go) v0.9.0
golang.org/x/time (go) v0.3.0
golang.org/x/xerrors (go) v0.0.0-20220907171357-04be3eba64a2
gopkg.in/check.v1 (go) v1.0.0-20201130134442-10cb98267c6c
gopkg.in/yaml.v3 (go) v3.0.1
Files by Type (count)
Go
131
Markdown
10
YAML
4
JSON
4
Other (no ext)
2
Dockerfile
1
Other (.ssl_setup)
1
CSV
1
Makefile
1
Shell
1
Other (.mod)
1
Other (.sum)
1
Files by Type (size)
Go
736KB
Other (.sum)
102KB
Markdown
47KB
JSON
33KB
Other (no ext)
11KB
Protocol Buffers
8KB
YAML
6KB
Dockerfile
2KB
Other (.mod)
1KB
Other (.ssl_setup)
1KB
Makefile
1KB
CSV
621B

The LLM identified 4 files worth highlighting for reuse:

The `mapper` package is a self-contained library for computing optimal Kafka partition placements. It implements two rebuild strategies (count-based and storage-based), supports rack-aware constraints, substitution affinities, and leader-follower optimization. The core types (`PartitionMap`, `BrokerMap`, `Constraints`) are cleanly abstracted and could be extracted for use in any Kafka partition reassignment tool. The package includes thorough unit tests and test data, demonstrating non-trivial algorithmic skill.

file: mapper/ ↗ | tags: #partition-placement #constraint-satisfaction #storage-aware-optimization

`kafkaadmin` provides a clean Go interface (`KafkaAdmin`) for common Kafka administrative operations: creating/deleting topics, describing brokers and topics, setting and removing throttles, and managing configurations. It includes a stub implementation for unit testing and integration tests against a real Kafka cluster. This abstraction is reusable across any Go project that needs to interact with Kafka's admin API, and its design pattern (interface + stub + integration test) is a model for testable infrastructure code.

file: kafkaadmin/ ↗ | tags: #kafka-admin-client #interface-abstraction #testing-stubs

`kafkazk` abstracts ZooKeeper interactions for Kafka metadata, including reading/writing topic states, reassignment data, broker metrics, and configs. It provides a `Handler` interface with a real `ZKHandler` implementation and a stub for unit tests. The package handles JSON serialization, gzip compression, and ZooKeeper node management. This is a reusable pattern for any Go service that needs to read or write Kafka metadata in ZooKeeper, and its design decouples the application from direct ZooKeeper API calls.

file: kafkazk/ ↗ | tags: #zookeeper-abstraction #kafka-metadata #testing-stubs

The `cluster/zookeeper` package implements a distributed lock using ZooKeeper sequential ephemeral nodes with TTL support. It provides a fair queuing mechanism and is used internally by the registry server for coordinating tag cleanup. The implementation is self-contained, well-tested (including integration tests), and demonstrates a robust pattern for distributed coordination that can be reused in any Go application requiring ZooKeeper-based locking.

file: cluster/zookeeper/ ↗ | tags: #distributed-locking #zookeeper-sequences #ttl-support
Last analyzed: 2026-09-20 13:53:07.694318
Next check: 2026-09-27 13:53:07.689099
$ submit: