[
https://issues.apache.org/jira/browse/HBASE-16717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15525386#comment-15525386
]
Anoop Sam John commented on HBASE-16717:
----------------------------------------
So we avoid 2 objects creation (The Checksum object per type and DataCheckSum
object). But we do have a ThreadLocal read. The ThreadLocal comes with
overhead. So am not sure abt the gain of 2 object not getting created is worth
enough. I feel it is ok to create object as per demand only than going with TL.
Ya the allocation u wil see some gain.. But on net perf I dont think so. The
GC should be able to clean these objects fast. Pls check
> Reuse DataChecksum
> ------------------
>
> Key: HBASE-16717
> URL: https://issues.apache.org/jira/browse/HBASE-16717
> Project: HBase
> Issue Type: Improvement
> Reporter: binlijin
> Priority: Minor
> Attachments: HBASE-16717-master.patch
>
>
> Every time to generateChecksums or validateChecksum will create a new
> DataChecksum, and DataChecksum is not thread safe, so use ThreadLocal to
> reuse it and keep thread safe.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)