Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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.