Skip to content

Add rd_kafka_DescribeLogDirs admin API#5333

Draft
Piotr WOLSKI (piochelepiotr) wants to merge 1 commit intoconfluentinc:masterfrom
piochelepiotr:add-describe-logdirs-admin-api
Draft

Add rd_kafka_DescribeLogDirs admin API#5333
Piotr WOLSKI (piochelepiotr) wants to merge 1 commit intoconfluentinc:masterfrom
piochelepiotr:add-describe-logdirs-admin-api

Conversation

@piochelepiotr

Summary

Implements the DescribeLogDirs admin API (Kafka API key 35, KIP-113) to allow querying partition sizes in bytes on disk for capacity planning and monitoring.

  • Adds full C admin API following the ElectLeaders pattern (self-contained protocol request/response)
  • Supports protocol versions 0-4 with flexible version negotiation (v2+)
  • topics parameter accepts a topic-partition list to filter, or NULL for all topics
  • Request targets a specific broker via AdminOptions_set_broker(), defaults to controller
  • No fanout: single broker per call (same as Java AdminClient)

Resolves #5192

Changes

  • src/rdkafka_op.h/c — New RD_KAFKA_OP_DESCRIBELOGDIRS op type
  • src/rdkafka.h — Public API: event define, typedefs, opaque types, function declarations, accessors
  • src/rdkafka_admin.h — Internal structs for LogDirDescription, LogDirTopicDescription, LogDirPartitionDescription
  • src/rdkafka_request.h/c — Protocol request builder with v0-v4 negotiation
  • src/rdkafka_admin.c — Entry point, response parser, result types, all public accessors
  • src/rdkafka_event.h/c — Event type registration and getter
  • tests/0080-admin_ut.c — Unit tests (4 variants: main/temp queue × with/without options)

Test plan

  • cmake build succeeds with no new warnings
  • ./tests/test-runner 0080 passes all existing and new tests
  • Manual test against local Kafka broker at localhost:9092 (if available)

🤖 Generated with Claude Code

@confluent-cla-assistant
Copy link

confluent-cla-assistant bot commented Feb 26, 2026

🎉 All Contributor License Agreements have been signed. Ready to merge.
✅ piochelepiotr
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Admin request DescribeLogDirs which allows to query partition sizes

1 participant