Prithvi S created HDDS-18002:
--------------------------------

             Summary: Avoid throwaway ByteBuffer in 
IntegerCodec/LongCodec/ShortCodec
                 Key: HDDS-18002
                 URL: https://issues.apache.org/jira/browse/HDDS-18002
             Project: Apache Ozone
          Issue Type: Improvement
            Reporter: Prithvi S


Checksum.int2ByteString calls IntegerCodec.toByteArray on every checksum window 
(default 16 KiB), so a 4 MiB chunk does this hundreds of times on client write 
and DN validate. Same ByteBuffer.wrap(new byte[N]).putX().array() pattern in 
LongCodec and ShortCodec.

Replace with bit-shifts into a new byte[] (Guava Ints/Longs/Shorts shape). 

Related: HDDS-2405 / HDDS-7161 on int2ByteString



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to