ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Boudnik <...@apache.org>
Subject Re: Random numbers generation
Date Sat, 09 May 2015 01:31:00 GMT
Eh... good enough I think ;) Thanks!

On Sat, May 09, 2015 at 01:34AM, Ivan Veselovskiy wrote:
> My guess: that was done in order to be uniform with ignite.bat .
> 
> On Fri, May 8, 2015 at 11:50 PM, Konstantin Boudnik <cos@apache.org> wrote:
> 
> > Guys,
> >
> > 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
> > or
> >     $ od -vAn -N4 -tu4 < /dev/urandom   # (if you want get fancy)
> >
> > But there should be a reason behind using UUID. What's that? Thanks!
> >   Cos
> >

Mime
View raw message