conduktor.io ↗

Kafka DescribeLogDirs Response Wire Format v5 — Binary Protocol Layout

What is DescribeLogDirs?

Shows per-broker disk usage, replica offset lag, and which replicas are mid-move (futureLogDir), via kafka-log-dirs.sh. High offsetLag on a follower replica indicates it's lagging behind the leader; compare with the ISR list to assess replication health.

Related Errors

CLUSTER_AUTHORIZATION_FAILED · KAFKA_STORAGE_ERROR · NOT_LEADER_OR_FOLLOWER · UNKNOWN_TOPIC_OR_PARTITION

Wire Diagram

Response Header · flexible
message_size int32 · 4B
correlation_id int32 · 4B
tagged var
DescribeLogDirsResponse v5
ThrottleTimeMs int32 · 4B
ErrorCode int16 · 2B
Results array
tagged var
ErrorCode int16 · 2B
LogDir string (compact)
Topics array
TotalBytes int64 · 8B
UsableBytes int64 · 8B
IsCordoned bool · 1B
tagged var
Name string (compact)
Partitions array
tagged var
PartitionIndex int32 · 4B
PartitionSize int64 · 8B
OffsetLag int64 · 8B
IsFutureKey bool · 1B
tagged var

Schema & Example

Schema
{
  "ThrottleTimeMs": int32,
  "ErrorCode": int16,
  "Results": [{
      "ErrorCode": int16,
      "LogDir": string,
      "Topics": [{
          "Name": string,
          "Partitions": [{
              "PartitionIndex": int32,
              "PartitionSize": int64,
              "OffsetLag": int64,
              "IsFutureKey": bool
          }]
      }],
      "TotalBytes": int64,
      "UsableBytes": int64,
      "IsCordoned": bool
  }]
}
Example
{
  "ThrottleTimeMs": 0,
  "ErrorCode": 0,
  "Results": [{
      "ErrorCode": 0,
      "LogDir": "/var/kafka-logs",
      "Topics": [{
          "Name": "orders",
          "Partitions": [{
              "PartitionIndex": 3,
              "PartitionSize": 1048576,
              "OffsetLag": 150382,
              "IsFutureKey": true
          }]
      }],
      "TotalBytes": 65536,
      "UsableBytes": 65536,
      "IsCordoned": true
  }]
}