You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Krishna Kumar Asawa (Jira)" <ji...@apache.org> on 2023/10/30 06:11:00 UTC
[jira] [Assigned] (HDDS-9549) defaultReadBufferCapacity should be int instead of long
[ https://issues.apache.org/jira/browse/HDDS-9549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krishna Kumar Asawa reassigned HDDS-9549:
-----------------------------------------
Assignee: Tejaskriya Madhan
> defaultReadBufferCapacity should be int instead of long
> -------------------------------------------------------
>
> Key: HDDS-9549
> URL: https://issues.apache.org/jira/browse/HDDS-9549
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Datanode
> Reporter: Tsz-wo Sze
> Assignee: Tejaskriya Madhan
> Priority: Major
>
> The defaultReadBufferCapacity is long in BlockManagerImpl/FilePerBlockStrategy/FilePerChunkStrategy. However, it is casted to int when it is used as shown below.
> {code:java}
> //BufferUtils.assignByteBuffers
> for (int i = 0; i < numBuffers - 1; i++) {
> dataBuffers[i] = ByteBuffer.allocate((int) bufferCapacity);
> buffersAllocated += bufferCapacity;
> }
> {code}
> Using long as buffer capacity does NOT work for all the following
> - Java array
> - Java ByteBuffer
> - Protobuf ByteString
> - Netty ByteBuf
> It does not seem to have a good use case for having a buffer with capacity >=2GB.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org