...
Code Block | ||
---|---|---|
| ||
{
"apiKey": 0,
"type": "data",
"name": "RemoteLogSegmentMetadataRecord",
"validVersions": "0",
"flexibleVersions": "none",
"fields": [
{
"name": "RemoteLogSegmentId",
"type": "RemoteLogSegmentIdEntry",
"versions": "0+",
"about": "The transactional id corresponding to the transaction.",
"fields": [
{
"name": "topic",
"type": "string",
"versions": "0+",
"about": "Topic name"
},
{
"name": "partition",
"type": "int32",
"versions": "0+",
"about": "Partition number"
},
{
"name": "id",
"type": "uuid",
"versions": "0+",
"about": "unique identifier"
}
]
},
{
"name": "StartOffset",
"type": "int64",
"versions": "0+",
"about": "Start offset of the segment."
},
{
"name": "endOffset",
"type": "int64",
"versions": "0+",
"about": "End offset of the segment."
},
{
"name": "LeaderEpoch",
"type": "int32",
"versions": "0+",
"about": "Leader epoch from which this segment instance is created or updated"
},
{
"name": "MaxTimestamp",
"type": "int64",
"versions": "0+",
"about": "Maximum timestamp with in this segment."
},
{
"name": "EventTimestamp",
"type": "int64",
"versions": "0+",
"about": "Event timestamp of this segment."
},
{
"name": "SegmentLeaderEpochs",
"type": "[]SegmentLeaderEpochEntry",
"versions": "0+",
"about": "Event timestamp of this segment.",
"fields": [
{
"name": "LeaderEpoch",
"type": "int32",
"versions": "0+",
"about": "Leader epoch"
},
{
"name": "Offset",
"type": "int64",
"versions": "0+",
"about": "Start offset for the leader epoch"
}
]
},
{
"name": "SegmentSizeInBytes",
"type": "int64",
"versions": "0+",
"about": "Segment size in bytes"
},
{
"name": "State",
"type": "int8",
"versions": "0+",
"about": "State of the segment"
}
]
}
/**
* It indicates the state of the remote log segment. This will be based on the action executed on this segment by
* remote log service implementation.
*
* todo: check whether the state validations to be checked or not, add next possible states for each state.
*/
public enum State {
/**
* This state indicates that the segment copying to remote storage is started but not yet finished.
*/
COPY_STARTED((byte) 0),
/**
* This state indicates that the segment copying to remote storage is finished.
*/
COPY_FINISHED((byte) 1),
/**
* This segment is marked for delete. That means, it is eligible for deletion. This is used when a topic/partition
* is deleted so that deletion agents can start deleting them as the leader/follower does not exist.
*/
DELETE_MARKED((byte) 2),
/**
* This state indicates that the segment deletion is started but not yet finished.
*/
DELETE_STARTED((byte) 3),
/**
* This state indicates that the segment is deleted successfully.
*/
DELETE_FINISHED((byte) 4);
...
} |
Configs
remote.log.metadata.topic.replication.factor | Replication factor of the topic Default: 3 |
remote.log.metadata.topic.partitions | No of partitions of the topic Default: 50 |
remote.log.metadata.topic.retention.ms | Retention of the topic in milli seconds Default: 365 * 24 * 60 * 60 * 1000 (1 yr) |
remote.log.metadata.manager.listener.name | Listener name to be used to connect to the local broker by RemoteLogMetadataManager implementation on the broker. Respective endpoint address is passed with "bootstrap.servers" property while invoking RemoteLogMetadataManager#configure(Map<String, ?> props). This is used by kafka clients created in RemoteLogMetadataManager implementation. |
remote.log.metadata.* | Any other properties should be prefixed with "remote.log.metadata." and these will be passed to RemoteLogMetadataManager#configure(Map<String, ?> props). For ex: Security configuration to connect to the local broker for the listener name configured are passed with props. |
...