You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Konstantin Boudnik <co...@apache.org> on 2015/05/08 21:50:04 UTC
Random numbers generation
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
Re: Random numbers generation
Posted by Konstantin Boudnik <co...@apache.org>.
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 <co...@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
> >
Re: Random numbers generation
Posted by Ivan Veselovskiy <iv...@gridgain.com>.
My guess: that was done in order to be uniform with ignite.bat .
On Fri, May 8, 2015 at 11:50 PM, Konstantin Boudnik <co...@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
>