[
https://issues.apache.org/jira/browse/HBASE-7612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15501898#comment-15501898
]
Duo Zhang commented on HBASE-7612:
----------------------------------
I added the Deprecated annotation to Counter. We could remove it in the next
major release I think?
And for sumThenReset, the only place is
{code:title=HFile.java}
/**
* Number of checksum verification failures. It also
* clears the counter.
*/
public static final long getChecksumFailuresCount() {
return CHECKSUM_FAILURES.sumThenReset();
}
{code}
And the original code is
{code:title=HFile.java}
/**
* Number of checksum verification failures. It also
* clears the counter.
*/
public static final long getChecksumFailuresCount() {
long count = CHECKSUM_FAILURES.get();
CHECKSUM_FAILURES.set(0);
return count;
}
{code}
I think the original implementation will also miss some updates so it is not
very critical? And seems it is only used in testcase.
Thanks. [~enis]
> [JDK8] Replace use of high-scale-lib counters with intrinsic facilities
> -----------------------------------------------------------------------
>
> Key: HBASE-7612
> URL: https://issues.apache.org/jira/browse/HBASE-7612
> Project: HBase
> Issue Type: Sub-task
> Components: metrics
> Affects Versions: 2.0.0
> Reporter: Andrew Purtell
> Assignee: Duo Zhang
> Priority: Trivial
> Fix For: 2.0.0
>
> Attachments: HBASE-7612-v1.patch, HBASE-7612.patch
>
>
> JEP155 introduces a few new classes (DoubleAccumulator, DoubleAdder,
> LongAccumulator, LongAdder) that "internally employ contention-reduction
> techniques that provide huge throughput improvements as compared to Atomic
> variables". There are applications of these where we are currently using
> Cliff Click's high-scale-lib and for metrics.
> See http://openjdk.java.net/jeps/155
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)