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

Chia-Ping Tsai updated KAFKA-21081:
-----------------------------------
    Description: 
{{FileRecords.searchForTimestamp}}

{{RemoteLogManager.lookupTimestamp}}

{{RecordBatch.offsetOfMaxTimestamp}}

 

Those paths don't need the key and value, so using {{skipKeyValueIterator}} is 
the better choice. However, {{skipKeyValueIterator}} is declared on 
{{MutableRecordBatch}} only, and {{FileChannelRecordBatch}} doesn't implement 
it.

 

In short, we should move {{skipKeyValueIterator}} to {{{}RecordBatch{}}}, make 
{{FileChannelRecordBatch}} support it by delegating to {{{}loadFullBatch(){}}}, 
and replace {{streamingIterator}} with {{skipKeyValueIterator}} on those paths 🙂

  was:
{{FileRecords.searchForTimestamp}}

{{RemoteLogManager.lookupTimestamp}}

{{RecordBatch.offsetOfMaxTimestamp}}

{{}}

Those paths don't need the key and value, so using {{skipKeyValueIterator}} is 
the better choice. However, {{skipKeyValueIterator}} is declared on 
{{MutableRecordBatch}} only, and {{FileChannelRecordBatch}} doesn't implement 
it.

{{}}

{{In short, we should move }}{{skipKeyValueIterator}}{{ to 
}}{{{}RecordBatch{}}}{{{}, make {}}}{{FileChannelRecordBatch}}{{ support it by 
delegating to }}{{{}loadFullBatch(){}}}{{{}, and replace 
{}}}{{streamingIterator}}{{ with }}{{skipKeyValueIterator}}{{ on those paths 🙂}}


> Don't allocate key and value if all we care about is the timestamp
> ------------------------------------------------------------------
>
>                 Key: KAFKA-21081
>                 URL: https://issues.apache.org/jira/browse/KAFKA-21081
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Major
>
> {{FileRecords.searchForTimestamp}}
> {{RemoteLogManager.lookupTimestamp}}
> {{RecordBatch.offsetOfMaxTimestamp}}
>  
> Those paths don't need the key and value, so using {{skipKeyValueIterator}} 
> is the better choice. However, {{skipKeyValueIterator}} is declared on 
> {{MutableRecordBatch}} only, and {{FileChannelRecordBatch}} doesn't implement 
> it.
>  
> In short, we should move {{skipKeyValueIterator}} to {{{}RecordBatch{}}}, 
> make {{FileChannelRecordBatch}} support it by delegating to 
> {{{}loadFullBatch(){}}}, and replace {{streamingIterator}} with 
> {{skipKeyValueIterator}} on those paths 🙂



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to