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 "Andrew Wang (JIRA)" <ji...@apache.org> on 2015/04/29 22:13:06 UTC

[jira] [Commented] (HADOOP-11891) OsSecureRandom should lazily fill its reservoir

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

Andrew Wang commented on HADOOP-11891:
--------------------------------------

Hey Arun, looks good, I think we can improve it a bit more by lazily opening the FileInputStream too. That way we save the open and the FD if the Random is never used.

> OsSecureRandom should lazily fill its reservoir
> -----------------------------------------------
>
>                 Key: HADOOP-11891
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11891
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.7.0
>            Reporter: Arun Suresh
>            Assignee: Arun Suresh
>             Fix For: 2.7.1
>
>         Attachments: HADOOP-11891.1.patch
>
>
> The {{OsSecureRandom}} class that is initialized by on the the {{CryptoCodec}} implementations eagerly fills its reservoir of random bits. This will result in too many file descriptors being opened simply and is not really required if the client already has a random IV and key needed for decryption.



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