You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Keith Wall (Jira)" <ji...@apache.org> on 2023/03/17 10:01:00 UTC

[jira] [Commented] (KAFKA-13900) Support Java 9 direct ByteBuffer Checksum methods

    [ https://issues.apache.org/jira/browse/KAFKA-13900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17701625#comment-17701625 ] 

Keith Wall commented on KAFKA-13900:
------------------------------------

This Jira was landed in 3.4, [https://github.com/apache/kafka/blob/3.4/clients/src/main/java/org/apache/kafka/common/utils/Checksums.java] , but the Jira's state hasn't been updated to reflect this.

> Support Java 9 direct ByteBuffer Checksum methods
> -------------------------------------------------
>
>                 Key: KAFKA-13900
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13900
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients, core
>    Affects Versions: 3.1.1
>            Reporter: Francesco Nigro
>            Priority: Minor
>              Labels: performance, performance-benchmark
>
> Java 9 has added a new Checksum method that can makes uses of ByteBuffer(s) (see [Java 9's Checksum::update|https://docs.oracle.com/javase/9/docs/api/java/util/zip/Checksum.html#update-java.nio.ByteBuffer-]): Kafka already provides specific support for Java 9's Cr32C, hence it makes sense it's going to use the most optimized version of it for direct ByteBuffers as well (read-only or not), instead of performing a byte-per-byte computation.
>  
> I'm aware that currently the client's Buffer pools aren't using direct ByteBuffer, but having full support for it can open the door to future interesting optimizations on it.



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