You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Shashikant Banerjee (Jira)" <ji...@apache.org> on 2019/10/09 08:06:00 UTC

[jira] [Resolved] (HDDS-2261) Change readChunk methods to return ByteBuffer

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

Shashikant Banerjee resolved HDDS-2261.
---------------------------------------
    Resolution: Fixed

> Change readChunk methods to return ByteBuffer
> ---------------------------------------------
>
>                 Key: HDDS-2261
>                 URL: https://issues.apache.org/jira/browse/HDDS-2261
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>            Reporter: Istvan Fajth
>            Assignee: Istvan Fajth
>            Priority: Major
>              Labels: pull-request-available
>
> During refactoring to HDDS-2233 I realized the following:
> KeyValueHandler.handleReadChunk and handleGetSmallFile methods are using ChunkManager.readChunk, which returns a byte[], but then both of them (the only usage points) converts the returning byte[] to a ByteBuffer, and then to a ByteString.
> ChunkManagerImpl on the other hand in readChunk utilizes ChunkUtils.readChunk, which in order to conform the return value converts a ByteBuffer back to a byte[].
> I open this JIRA to change the internal logic to fully rely on ByteBuffers instead of converting from ByteBuffer to byte[] then to ByteBuffer again.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org