hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiroshi Ikeda (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-15702) Improve PerClientRandomNonceGenerator
Date Mon, 25 Apr 2016 06:11:12 GMT
Hiroshi Ikeda created HBASE-15702:

             Summary: Improve PerClientRandomNonceGenerator
                 Key: HBASE-15702
                 URL: https://issues.apache.org/jira/browse/HBASE-15702
             Project: HBase
          Issue Type: Improvement
            Reporter: Hiroshi Ikeda
            Priority: Trivial

PerClientRandomNonceGenerator can be exposed to all the threads via the static field ConnectionManager.nonceGenerator,
but PerClientRandomNonceGenerator uses Random, which should be ThreadLocalRandom or something.
(See javadoc of Random.)

Moreover, ConnectionManager creates or refers the singleton instance of PerClientThreadLocalRandom
with a lock or volatile, but it should be created as a static final field in PerClientThreadLocalRandom
itself, and the creation will be postponed until the field is actually refereed and the class
is being initialized.

The same can be said for ConnectionManager.NoNonceGenerator.

This message was sent by Atlassian JIRA

View raw message