You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Alexey Kuznetsov <ak...@gridgain.com> on 2015/04/11 04:47:21 UTC

ClusterGroup.forRandom() inconsistent

Hi!

I found that ClusterGroup.forRandom() is inconsistent for me.

If I try to take forRandom() on empty cluster group
 it throws "*java.lang.IllegalArgumentException: n must be positive*"

I think *forRandom() *should return empty cluster group in order to not
check if source projection is empty.

Or at least throws exception with meaningful text.

Thoughts?

-- 
Alexey Kuznetsov
GridGain Systems
www.gridgain.com

Re: ClusterGroup.forRandom() inconsistent

Posted by Alexey Kuznetsov <ak...@gridgain.com>.
Created issue: https://issues.apache.org/jira/browse/IGNITE-731

On Sun, Apr 12, 2015 at 1:04 AM, Konstantin Boudnik <co...@apache.org> wrote:

> I think you're right (from a layman standpoint).
>
> Cos
>
> On Sat, Apr 11, 2015 at 09:47AM, Alexey Kuznetsov wrote:
> > Hi!
> >
> > I found that ClusterGroup.forRandom() is inconsistent for me.
> >
> > If I try to take forRandom() on empty cluster group
> >  it throws "*java.lang.IllegalArgumentException: n must be positive*"
> >
> > I think *forRandom() *should return empty cluster group in order to not
> > check if source projection is empty.
> >
> > Or at least throws exception with meaningful text.
> >
> > Thoughts?
> >
> > --
> > Alexey Kuznetsov
> > GridGain Systems
> > www.gridgain.com
>



-- 
Alexey Kuznetsov
GridGain Systems
www.gridgain.com

Re: ClusterGroup.forRandom() inconsistent

Posted by Konstantin Boudnik <co...@apache.org>.
I think you're right (from a layman standpoint).

Cos

On Sat, Apr 11, 2015 at 09:47AM, Alexey Kuznetsov wrote:
> Hi!
> 
> I found that ClusterGroup.forRandom() is inconsistent for me.
> 
> If I try to take forRandom() on empty cluster group
>  it throws "*java.lang.IllegalArgumentException: n must be positive*"
> 
> I think *forRandom() *should return empty cluster group in order to not
> check if source projection is empty.
> 
> Or at least throws exception with meaningful text.
> 
> Thoughts?
> 
> -- 
> Alexey Kuznetsov
> GridGain Systems
> www.gridgain.com