hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Drob (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-19164) Avoid UUID.randomUUID in tests
Date Thu, 02 Nov 2017 21:57:00 GMT

    [ https://issues.apache.org/jira/browse/HBASE-19164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16236667#comment-16236667

Mike Drob commented on HBASE-19164:

[~apurtell]'s suggestion on HBASE-19150

Generally I think we can do
new UUID(ThreadLocalRandom.current().nextLong(), ThreadLocalRandom.current().nextLong())

> Avoid UUID.randomUUID in tests
> ------------------------------
>                 Key: HBASE-19164
>                 URL: https://issues.apache.org/jira/browse/HBASE-19164
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>            Reporter: Mike Drob
>            Priority: Major
>              Labels: beginner
> We have a lot of places in our test code where we use {{UUID.randomUUID}} to generate
table names or paths for uniqueness. Unfortunately, this uses up a good chunk of system entropy,
since Sun chose that random UUID's should use the NativePRNGBlocking implementation.
> We don't need to block on entropy for random bits to pick a random table name in a test,
so we can use something that doesn't strain the system too much - secure random can be a source
of problems on some VM or containers.

This message was sent by Atlassian JIRA

View raw message