Skip to content
m manifester.io
All Kafka APIs

AssignReplicasToDirs

This page encodes the smallest legal instance of the request and the response: numeric fields are zero, strings and byte arrays are empty, every array carries exactly one sample element, and any records field holds one empty 61-byte RecordBatch v2. Version 0 is a flexible version, so every struct is terminated by a uvarint tagged-field count and strings and arrays carry compact length-plus-one prefixes. Sizes below include the leading int32 size prefix.

API key
73
Encoded at
v0
Flexible versions
0+
Headers
req v2, resp v1
Request versions
0
Response versions
0
Request size
70 bytes
Response size
60 bytes
framerpc headerrequest bodyRecordBatchRecordresponse bodytagged_fields

Request

AssignReplicasToDirsRequest v0, request header v2, 70 bytes on the wire

byte layout (70 bytes, 16 bytes per row)

0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010
0020
0030
0040

object tree

AssignReplicasToDirsRequest                     message v0                                               [0x0000, 70B]
+-- Frame                                                                                                [0x0000, 4B]   length-delimited framing
|   +-- size                                    int32            = 66                                    [0x0000, 4B]   number of bytes that follow, patched after encoding
+-- RequestHeader                               v2                                                       [0x0004, 11B]  common request header
|   +-- request_api_key                         int16            = 73 (AssignReplicasToDirs)             [0x0004, 2B]   numeric id of the API being invoked
|   +-- request_api_version                     int16            = 0                                     [0x0006, 2B]   version of the API being invoked
|   +-- correlation_id                          int32            = 0                                     [0x0008, 4B]   echoed back by the broker in the response
|   +-- client_id                               nullable_string  = "" (int16 len=0)                      [0x000c, 2B]   always a non-flexible int16-prefixed string
|   +-- tagged_fields                           uvarint          = 0                                     [0x000e, 1B]   number of tagged fields in the header
+-- AssignReplicasToDirsRequest                 struct                                                   [0x000f, 55B]  message body, version 0
    +-- BrokerId                                int32            = 0                                     [0x000f, 4B]   The ID of the requesting broker.
    +-- BrokerEpoch                             int64            = 0                                     [0x0013, 8B]   The epoch of the requesting broker.
    +-- Directories                             []DirectoryData  = 1 element                             [0x001b, 42B]  The directories to which replicas should be assigned.
    |   +-- length                              uvarint          = 2 (compact, n+1)                      [0x001b, 1B]   one sample element follows
    |   +-- DirectoryData[0]                    DirectoryData    = struct                                [0x001c, 41B]
    |       +-- Id                              uuid             = 00000000-0000-0000-0000-000000000000  [0x001c, 16B]  The ID of the directory.
    |       +-- Topics                          []TopicData      = 1 element                             [0x002c, 24B]  The topics assigned to the directory.
    |       |   +-- length                      uvarint          = 2 (compact, n+1)                      [0x002c, 1B]   one sample element follows
    |       |   +-- TopicData[0]                TopicData        = struct                                [0x002d, 23B]
    |       |       +-- TopicId                 uuid             = 00000000-0000-0000-0000-000000000000  [0x002d, 16B]  The ID of the assigned topic.
    |       |       +-- Partitions              []PartitionData  = 1 element                             [0x003d, 6B]   The partitions assigned to the directory.
    |       |       |   +-- length              uvarint          = 2 (compact, n+1)                      [0x003d, 1B]   one sample element follows
    |       |       |   +-- PartitionData[0]    PartitionData    = struct                                [0x003e, 5B]
    |       |       |       +-- PartitionIndex  int32            = 0                                     [0x003e, 4B]   The partition index.
    |       |       |       +-- tagged_fields   uvarint          = 0                                     [0x0042, 1B]   number of tagged fields in this struct
    |       |       +-- tagged_fields           uvarint          = 0                                     [0x0043, 1B]   number of tagged fields in this struct
    |       +-- tagged_fields                   uvarint          = 0                                     [0x0044, 1B]   number of tagged fields in this struct
    +-- tagged_fields                           uvarint          = 0                                     [0x0045, 1B]   number of tagged fields in this struct

kafka message schema (.json)

{
  "apiKey": 73,
  "type": "request",
  "listeners": ["controller"],
  "name": "AssignReplicasToDirsRequest",
  "validVersions": "0",
  "flexibleVersions": "0+",
  "fields": [
    { "name": "BrokerId", "type": "int32", "versions": "0+", "entityType": "brokerId",
      "about": "The ID of the requesting broker." },
    { "name": "BrokerEpoch", "type": "int64", "versions": "0+", "default": "-1",
      "about": "The epoch of the requesting broker." },
    { "name": "Directories", "type":  "[]DirectoryData", "versions": "0+",
      "about": "The directories to which replicas should be assigned.", "fields":  [
      { "name": "Id", "type": "uuid", "versions": "0+", "about": "The ID of the directory." },
      { "name": "Topics", "type": "[]TopicData", "versions": "0+",
        "about": "The topics assigned to the directory.", "fields": [
        { "name": "TopicId", "type": "uuid", "versions": "0+",
          "about": "The ID of the assigned topic." },
        { "name": "Partitions", "type": "[]PartitionData", "versions": "0+",
          "about": "The partitions assigned to the directory.", "fields": [
          { "name": "PartitionIndex", "type": "int32", "versions": "0+",
            "about": "The partition index." }
        ]}
      ]}
    ]}
  ]
}

Response

AssignReplicasToDirsResponse v0, response header v1, 60 bytes on the wire

byte layout (60 bytes, 16 bytes per row)

0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010
0020
0030

object tree

AssignReplicasToDirsResponse                    message v0                                               [0x0000, 60B]
+-- Frame                                                                                                [0x0000, 4B]   length-delimited framing
|   +-- size                                    int32            = 56                                    [0x0000, 4B]   number of bytes that follow, patched after encoding
+-- ResponseHeader                              v1                                                       [0x0004, 5B]   common response header
|   +-- correlation_id                          int32            = 0                                     [0x0004, 4B]   matches the correlation_id of the request
|   +-- tagged_fields                           uvarint          = 0                                     [0x0008, 1B]   number of tagged fields in the header
+-- AssignReplicasToDirsResponse                struct                                                   [0x0009, 51B]  message body, version 0
    +-- ThrottleTimeMs                          int32            = 0                                     [0x0009, 4B]   The duration in milliseconds for which the request was throttled due to a q...
    +-- ErrorCode                               int16            = 0                                     [0x000d, 2B]   The top level response error code.
    +-- Directories                             []DirectoryData  = 1 element                             [0x000f, 44B]  The list of directories and their assigned partitions.
    |   +-- length                              uvarint          = 2 (compact, n+1)                      [0x000f, 1B]   one sample element follows
    |   +-- DirectoryData[0]                    DirectoryData    = struct                                [0x0010, 43B]
    |       +-- Id                              uuid             = 00000000-0000-0000-0000-000000000000  [0x0010, 16B]  The ID of the directory.
    |       +-- Topics                          []TopicData      = 1 element                             [0x0020, 26B]  The list of topics and their assigned partitions.
    |       |   +-- length                      uvarint          = 2 (compact, n+1)                      [0x0020, 1B]   one sample element follows
    |       |   +-- TopicData[0]                TopicData        = struct                                [0x0021, 25B]
    |       |       +-- TopicId                 uuid             = 00000000-0000-0000-0000-000000000000  [0x0021, 16B]  The ID of the assigned topic.
    |       |       +-- Partitions              []PartitionData  = 1 element                             [0x0031, 8B]   The list of assigned partitions.
    |       |       |   +-- length              uvarint          = 2 (compact, n+1)                      [0x0031, 1B]   one sample element follows
    |       |       |   +-- PartitionData[0]    PartitionData    = struct                                [0x0032, 7B]
    |       |       |       +-- PartitionIndex  int32            = 0                                     [0x0032, 4B]   The partition index.
    |       |       |       +-- ErrorCode       int16            = 0                                     [0x0036, 2B]   The partition level error code.
    |       |       |       +-- tagged_fields   uvarint          = 0                                     [0x0038, 1B]   number of tagged fields in this struct
    |       |       +-- tagged_fields           uvarint          = 0                                     [0x0039, 1B]   number of tagged fields in this struct
    |       +-- tagged_fields                   uvarint          = 0                                     [0x003a, 1B]   number of tagged fields in this struct
    +-- tagged_fields                           uvarint          = 0                                     [0x003b, 1B]   number of tagged fields in this struct

kafka message schema (.json)

{
  "apiKey": 73,
  "type": "response",
  "name": "AssignReplicasToDirsResponse",
  "validVersions": "0",
  "flexibleVersions": "0+",
  "fields": [
    { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
      "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
    { "name": "ErrorCode", "type": "int16", "versions": "0+",
      "about": "The top level response error code." },
    { "name": "Directories", "type":  "[]DirectoryData", "versions": "0+",
      "about": "The list of directories and their assigned partitions.", "fields":  [
      { "name": "Id", "type": "uuid", "versions": "0+", "about": "The ID of the directory." },
      { "name": "Topics", "type": "[]TopicData", "versions": "0+",
        "about": "The list of topics and their assigned partitions.", "fields": [
        { "name": "TopicId", "type": "uuid", "versions": "0+",
          "about": "The ID of the assigned topic." },
        { "name": "Partitions", "type": "[]PartitionData", "versions": "0+",
          "about": "The list of assigned partitions.", "fields": [
          { "name": "PartitionIndex", "type": "int32", "versions": "0+",
            "about": "The partition index." },
          { "name": "ErrorCode", "type": "int16", "versions": "0+",
            "about": "The partition level error code." }
        ]}
      ]}
    ]}
  ]
}