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

Wei-Chiu Chuang commented on HADOOP-11892:
------------------------------------------

[~xiaochen] You got it right. And you can also use lsof /dev/urandom to list 
open fds.
However, I have a different opinion on the fix. When we typically see problems 
with too many open fds to /dev/urandom, it's not the cost of instantiating a 
new instance of {{CryptoCodec}} that is expensive; it is generating random 
numbers that is expensive. The problem is when available entropy is depleted, 
reading from /dev/urandom could block, and what happens is you would end up 
seeing many open fds, because they are all waiting to read from /dev/urandom.

IMO, fixing this isn't really useful.

> CryptoCodec#getInstance always returns a new instance of CryptoCodec. This 
> could be expensive
> ---------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-11892
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11892
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.7.0
>            Reporter: Arun Suresh
>            Assignee: Arun Suresh
>
> {{CryptoCodec#getInsatnce}} should be able to return possibly cached 
> instances of the CryptoCodec implementation as instantiating a new instance 
> every time could be expensive



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

Reply via email to