...
Like the metadata log, the snapshot is made up of records. However, unlike the log, in which there may be multiple records describing a single entity, the snapshot will only contain the minimum number of records needed to describe all the entities.
As described in KIP-630, snapshots are local to each replica. For example, replica A may have a snapshot at offset 100, and deltas up to offset 150, whereas replica B may have a snapshot at 125 and deltas up to offset 150. Any snapshot must be usable as a starting point for loading the entire state of metadata. In other words, a new controller node must be able to load the a snapshot, and then apply all the edits which follow it, and come up-to-date.
...
Code Block |
---|
{ "apiKey": 4, "type": "metadataRecord", "name": "IsrChangeRecord", "validVersions": "0", "fields": [ { "name": "PartitionId", "type": "int32", "versions": "0+", "default": "-1", "about": "The partition id." }, { "name": "TopicId", "type": "uuid", "versions": "0+", "about": "The unique ID of this topic." }, { "name": "Isr", "type": "[]int32", "versions": "0+", "about": "The in-sync replicas of this partition" }, { "name": "Leader", "type": "int32", "versions": "0+", "default": "-1", "about": "The lead replica, or -1 if there is no leader." }, { "name": "LeaderEpoch", "type": "int32", "versions": "0+", "default": "-1", "about": "An epoch that gets incremented each time we change the ISR." } ] } |
AccessControlRecord
Code Block |
---|
{
"apiKey": 5,
"type": "metadataRecord",
"name": "AccessControlRecord",
"validVersions": "0",
"fields": [
{ "name": "ResourceType", "type": "int8", "versions": "0+",
"about": "The resource type" },
{ "name": "ResourceName", "type": "string", "versions": "0+", "nullableVersions": "0+",
"about": "The resource name, or null if this is for the default resource." },
{ "name": "PatternType", "type": "int8", "versions": "0+",
"about": "The pattern type (literal, prefixed, etc.)" },
{ "name": "Principal", "type": "string", "versions": "0+",
"about": "The principal name." },
{ "name": "Host", "type": "string", "versions": "0+",
"about": "The host." },
{ "name": "Operation", "type": "int8", "versions": "0+",
"about": "The operation type." },
{ "name": "PermissionType", "type": "int8", "versions": "0+",
"about": "The permission type (allow, deny)." }
]
} |
New Metrics
Full Name | Description |
---|---|
kafka.controller:type=KafkaController,name=MetadataLag | The offset delta between the latest metadata record this controller has replayed and the last stable offset of the metadata topic. |
kafka.controller:type=KafkaServer,name=MetadataLag | The offset delta between the latest metadata record this broker has replayed and the last stable offset of the metadata topic. |
kafka.controller:type=KafkaController,name=MetadataCommitLatencyMs | The latency of committing a message to the metadata topic. Relevant on the active controller. |
kafka.controller:type=KafkaController,name=MetadataCommitRate | The number of metadata messages per second committed to the metadata topic. |
kafka.controller:type=KafkaController,name=MetadataSnapshotLag | The offset delta between the latest stable offset of the metadata topic and the offset of the last snapshot (or 0 if there are no snapshots) |
kafka.controller:type=KafkaController,name=ControllerRequestsRate | The number of controller requests per second processed. |
...