You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Josh Elser (JIRA)" <ji...@apache.org> on 2016/02/17 22:04:18 UTC

[jira] [Created] (CALCITE-1094) Replace AvaticaUtils.readFully(InputStream)'s use of ByteArrayOutputStream

Josh Elser created CALCITE-1094:
-----------------------------------

             Summary: Replace AvaticaUtils.readFully(InputStream)'s use of ByteArrayOutputStream
                 Key: CALCITE-1094
                 URL: https://issues.apache.org/jira/browse/CALCITE-1094
             Project: Calcite
          Issue Type: Sub-task
          Components: avatica
            Reporter: Josh Elser
            Assignee: Josh Elser
             Fix For: next


I remember reading a ticket a long time ago (ACCUMULO-1000) about how use of ByteArrayOutputStream can be sub-optimal for low-latency calls due to the synchronization around the write method.

While ByteArrayOutputStream gets the job done, an unsynchronized buffer is sufficient for reading the bytes of the HTTP body off of the wire and into a byte array. We don't need the synchronization guarantees that come with BAOS.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)