Search in sources :

Example 1 with RemotePartitionDeleteMetadataRecord

use of org.apache.kafka.server.log.remote.metadata.storage.generated.RemotePartitionDeleteMetadataRecord in project kafka by apache.

the class RemotePartitionDeleteMetadataTransform method fromApiMessageAndVersion.

public RemotePartitionDeleteMetadata fromApiMessageAndVersion(ApiMessageAndVersion apiMessageAndVersion) {
    RemotePartitionDeleteMetadataRecord record = (RemotePartitionDeleteMetadataRecord) apiMessageAndVersion.message();
    TopicIdPartition topicIdPartition = new TopicIdPartition(record.topicIdPartition().id(), new TopicPartition(record.topicIdPartition().name(), record.topicIdPartition().partition()));
    return new RemotePartitionDeleteMetadata(topicIdPartition, RemotePartitionDeleteState.forId(record.remotePartitionDeleteState()), record.eventTimestampMs(), record.brokerId());
}
Also used : TopicPartition(org.apache.kafka.common.TopicPartition) TopicIdPartition(org.apache.kafka.common.TopicIdPartition) RemotePartitionDeleteMetadata(org.apache.kafka.server.log.remote.storage.RemotePartitionDeleteMetadata) RemotePartitionDeleteMetadataRecord(org.apache.kafka.server.log.remote.metadata.storage.generated.RemotePartitionDeleteMetadataRecord)

Aggregations

TopicIdPartition (org.apache.kafka.common.TopicIdPartition)1 TopicPartition (org.apache.kafka.common.TopicPartition)1 RemotePartitionDeleteMetadataRecord (org.apache.kafka.server.log.remote.metadata.storage.generated.RemotePartitionDeleteMetadataRecord)1 RemotePartitionDeleteMetadata (org.apache.kafka.server.log.remote.storage.RemotePartitionDeleteMetadata)1