THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
{ "apiKey": 57, "type": "request", "name": "BrokerRegistrationRequest", "validVersions": "0", "flexibleVersions": "0+", "fields": [ { "name": "BrokerId", "type": "int32", "versions": "0+", "about": "The broker ID." }, { "name": "ClusterId", "type": "uuid", "versions": "0+", "about": "The cluster id of the broker process." }, { "name": "IncarnationId", "type": "uuid", "versions": "0+", "about": "The incarnation id of the broker process." }, { "name": "NextMetadataOffset", "type": "int64", "versions": "0+", "about": "The highest metadata offset which the broker has not reached." }, { "name": "Listeners", "type": "[]Listener", "about": "The listeners of this broker", "versions": "0+", "fields": [ { "name": "Name", "type": "string", "versions": "0+", "mapKey": true, "about": "The name of the endpoint." }, { "name": "Host", "type": "string", "versions": "0+", "about": "The hostname." }, { "name": "Port", "type": "int16", "versions": "0+", "about": "The port." }, { "name": "SecurityProtocol", "type": "int16", "versions": "0+", "about": "The security protocol." } ] { "name": "Features", "type": "[]Feature", "about": "The features on this broker", "versions": "0+", "fields": [ { "name": "Name", "type": "string", "versions": "0+", "mapKey": true, "about": "The feature name." } { "name": "MinSupportedVersion", "type": "int16", "versions": "0+", "about": "The minimum supported feature level." }, { "name": "MaxSupportedVersion", "type": "int16", "versions": "0+", "about": "The maximum supported feature level." } ] }, { "name": "Rack", "type": "string", "versions": "0+", "nullableVersions": "0+", "about": "The rack which this broker is in." } ] } { "apiKey": 57, "type": "response", "name": "BrokerRegistrationResponse", "validVersions": "0", "flexibleVersions": "0+", "fields": [ { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+", "about": "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 error code, or 0 if there was no error." }, { "name": "ActiveControllerId", "type": "int32", "versions": "0+", "about": "The ID of the active controller, or -1 if the controller doesn't know." }, { "name": "BrokerEpoch", "type": "int64", "versions": "0+", "default": "-1", "about": "The broker's assigned epoch, or -1 if none was assigned." }, { "name": "LeaseDurationMs", "type": "int64", "versions": "0+", "about": "If BrokerEpoch is not -1, the number of milliseconds that we want the lease to last." } ] } |
BrokerHeartbeat
As described earlier, the broker periodically sends out a heartbeat request to the active controller.
]
}
|
BrokerHeartbeat
As described earlier, the broker periodically sends out a heartbeat request to the active controller.
Code Block | ||
---|---|---|
| ||
{
"apiKey": 58,
"type": "request",
| ||
Code Block | ||
| ||
{ "apiKey": 58, "type": "request", "name": "BrokerHeartbeatRequest", "validVersions": "0", "flexibleVersions": "0+", "fields": [ { "name": "TargetState", "type": "int8", "versions": "0+", "about": "The state that the broker wants to reach." }, { "name": "BrokerIdBrokerHeartbeatRequest", "typevalidVersions": "int320", "versionsflexibleVersions": "0+", "aboutfields": "The broker ID." },[ { "name": "BrokerEpochTargetState", "type": "int64int8", "versions": "0+", "default": "-1", "about": "The state that the broker wants to epochreach." }, { "name": "CurrentMetadataOffsetBrokerId", "type": "int64int32", "versions": "0+", "about": "One more than the highest metadata offset which theThe broker has reachedID." }, ] } { "apiKeyname": 58"BrokerEpoch", "type": "responseint64", "nameversions": "BrokerHeartbeatResponse0+", "validVersionsdefault": "0-1", "flexibleVersionsabout": "0+", The broker "fieldsepoch.": [}, { "name": "ThrottleTimeMsCurrentMetadataOffset", "type": "int32int64", "versions": "0+", "about": "DurationOne in milliseconds for whichmore than the requesthighest wasmetadata throttled due to a quota violation, or zero ifoffset which the requestbroker did not violate any quotahas reached." }, ] } { "nameapiKey": "ErrorCode"58, "type": "int16response", "versionsname": "0+BrokerHeartbeatResponse", "aboutvalidVersions": "0"The error code, or 0 if there was no error." },, "flexibleVersions": "0+", "fields": [ { "name": "ActiveControllerIdThrottleTimeMs", "type": "int32", "versions": "0+", "about": "The ID of the active controllerDuration in milliseconds for which the request was throttled due to a quota violation, or -1zero if the controller doesn't know request did not violate any quota." }, { "name": "NextStateErrorCode", "type": "int8int16", "versions": "0+", "about": "The error code, stateor to0 whichif thethere brokerwas shouldno transitionerror." }, { "name": "LeaseDurationMsNextState", "type": "int64int8", "versions": "0+", "about": "IfThe BrokerEpochstate is not -1,to which the numberbroker of milliseconds that we want the lease to lastshould transition." } ] } |
The controller will wait to unfence a broker until it has sent at least one heartbeat where that broker's currentState is active. So a typical transition will look like this:
...