[
https://issues.apache.org/jira/browse/HADOOP-9401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13605395#comment-13605395
]
Alejandro Abdelnur commented on HADOOP-9401:
--------------------------------------------
* 1st diff in the first hunk is a false change.
* 2nd & 3rd diff in the first hunk largely exceed 80 chars.
* Instead using 2 maps for counting, one for compressors and one for
decompressors, we could have just one that holds 2 counters as value.
* The counter value should be an int[] array instead an Integer to avoid object
auto boxing/unboxing.
* instead incCounter() method use an updateCounter(CompressionCodec cc, boolean
borrow)
* I don't see the counters being decremented on return.
* Instead 2 methods to get the counters, why no having a single method
'getPoolInfo()' that returns a CodecPool.Info bean that has 4 properties?
> CodecPool: Add counters for number of (de)compressors created
> -------------------------------------------------------------
>
> Key: HADOOP-9401
> URL: https://issues.apache.org/jira/browse/HADOOP-9401
> Project: Hadoop Common
> Issue Type: Improvement
> Affects Versions: 2.0.3-alpha
> Reporter: Karthik Kambatla
> Assignee: Karthik Kambatla
> Attachments: hadoop-9401.patch
>
>
> CodecPool enables reusing compressors/decompressors created. However, the
> onus is on the user to return the compressors/decompressors to the pool, and
> can be easily missed.
> It would be quite handy to keep track of the total number of
> compressors/decompressors created and helper methods to check outstanding
> (not returned) compressors/decompressors. It immediately allows Hadoop and
> downstream projects to write unit tests for the same.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira