ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Boudnik <...@apache.org>
Subject Random numbers generation
Date Fri, 08 May 2015 19:50:04 GMT

I've been looking at bin/ignite.sh and noticed that a random number is getting
generated to form the name of an essentially lock file. For that a java VM is
started. Eg

    RANDOM_NUMBER=$("$JAVA" -cp "${CP}" org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator)

While the start up time of modern JVM is blazingly short (just try to time it
yourself and prepare to be really surprised) I can't help by ask why it has to
be done this way? Unix in general, and bash in particular, provide native ways
of getting random numbers. E.g.

    $ echo $RANDOM
    $ od -vAn -N4 -tu4 < /dev/urandom   # (if you want get fancy)

But there should be a reason behind using UUID. What's that? Thanks!

View raw message