[ 
https://issues.apache.org/jira/browse/KAFKA-13020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jose Armando Garcia Sancio updated KAFKA-13020:
-----------------------------------------------
    Description: 
We want to expose control messages through {{o.a.k.r.Batch}} and 
{{RecordsIterator}}. This can be done by turning the type {{Batch<T>}} into an 
interface and adding the type {{ControlBatch implements Batch<?>}} and 
{{DataBatch<T> implements Batch<T>}}. The main different between 
{{DataBatch<T>}} and {{ControlBatch}} is that control record have a decoder 
that knows how to decode {{LeaderChangeMessage}}, {{SnapshotHeaderRecord}} and 
{{SnapshotFooterRecord}}.

These are the import type and signatures that we expose:
 # {{class RecordsIterator<T> implements Iterator<Batch<T>>}} this type will 
keep the current signature but it will be extended to know how to decode both 
Data and Control batches
 # {{interface BatchReader<T> extends Iterator<DataBatch<T>>}} this type only 
returns data batches
 # {{class SnapshotReader<T> implements Iterator<DataBatch<T>>}} this type only 
returns data batches but when it reads the header record it remembers the last 
contained log timestamp

> SnapshotReader should decode and report the append time in the header
> ---------------------------------------------------------------------
>
>                 Key: KAFKA-13020
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13020
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Jose Armando Garcia Sancio
>            Assignee: Jose Armando Garcia Sancio
>            Priority: Major
>
> We want to expose control messages through {{o.a.k.r.Batch}} and 
> {{RecordsIterator}}. This can be done by turning the type {{Batch<T>}} into 
> an interface and adding the type {{ControlBatch implements Batch<?>}} and 
> {{DataBatch<T> implements Batch<T>}}. The main different between 
> {{DataBatch<T>}} and {{ControlBatch}} is that control record have a decoder 
> that knows how to decode {{LeaderChangeMessage}}, {{SnapshotHeaderRecord}} 
> and {{SnapshotFooterRecord}}.
> These are the import type and signatures that we expose:
>  # {{class RecordsIterator<T> implements Iterator<Batch<T>>}} this type will 
> keep the current signature but it will be extended to know how to decode both 
> Data and Control batches
>  # {{interface BatchReader<T> extends Iterator<DataBatch<T>>}} this type only 
> returns data batches
>  # {{class SnapshotReader<T> implements Iterator<DataBatch<T>>}} this type 
> only returns data batches but when it reads the header record it remembers 
> the last contained log timestamp



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to