You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Yi Liu (JIRA)" <ji...@apache.org> on 2015/03/05 08:33:38 UTC

[jira] [Commented] (HADOOP-11674) oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static

    [ https://issues.apache.org/jira/browse/HADOOP-11674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14348315#comment-14348315 ] 

Yi Liu commented on HADOOP-11674:
---------------------------------

+1, {{oneByteBuf}} should be non-static, otherwise there may be issue for {{read()}} in multi threads.

> oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-11674
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11674
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 2.6.0
>            Reporter: Sean Busbey
>            Assignee: Sean Busbey
>            Priority: Critical
>         Attachments: HADOOP-11674.1.patch
>
>
> A common optimization in the io classes for Input/Output Streams is to save a single length-1 byte array to use in single byte read/write calls.
> CryptoInputStream and CryptoOutputStream both attempt to follow this practice but mistakenly mark the array as static. That means that only a single instance of each can be present in a JVM safely.



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