Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-2261

Change readChunk methods to return ByteBuffer

    XMLWordPrintableJSON

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.

      Attachments

        Issue Links

          Activity

            People

              pifta István Fajth
              pifta István Fajth
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: